IncomingHeartbeat Property

Specifies the server-to-class heartbeat timing.

Syntax

ANSI (Cross Platform)
int GetIncomingHeartbeat();
int SetIncomingHeartbeat(int iIncomingHeartbeat); Unicode (Windows) INT GetIncomingHeartbeat();
INT SetIncomingHeartbeat(INT iIncomingHeartbeat);
@property (nonatomic,readwrite,assign,getter=incomingHeartbeat,setter=setIncomingHeartbeat:) int incomingHeartbeat;
- (int)incomingHeartbeat;
- (void)setIncomingHeartbeat:(int)newIncomingHeartbeat;
#define PID_STOMP_INCOMINGHEARTBEAT 12

IPWORKSIOT_EXTERNAL void* IPWORKSIOT_CALL IPWorksIoT_STOMP_Get(void *lpObj, int propid, int arridx, int *lpcbVal, int64 *lpllVal);
IPWORKSIOT_EXTERNAL int IPWORKSIOT_CALL IPWorksIoT_STOMP_Set(void *lpObj, int propid, int arridx, const void *val, int cbVal);

Default Value

0

Remarks

This property specifies the incoming heartbeat interval, which is the number of seconds without any server-to-class communication that the server will allow to elapse before sending the class a heartbeat (keepalive). If set to 0 (default), incoming heartbeats are disabled.

For information about outgoing (class-to-server) heartbeats; see the OutgoingHeartbeat property.

Before Connecting

Before connecting, this property is used to specify the desired incoming heartbeat interval (in seconds). By default, this property is set to 0 (no heartbeat).

During the connection process, the incoming heartbeat interval requested by the class is compared to the minimum interval supported by the server, and the larger of the two values is selected. If one or both sides supply 0 as their value, then no server-to-class heartbeats will be sent.

After Connecting

After connecting, this property cannot be set. Instead, it reflects the incoming heartbeat interval agreed upon by the class and the server during the connection process.

As the incoming heartbeat interval negotiation notes above imply, it is possible that the agreed-upon incoming heartbeat interval may either be larger than what the class requested, or may be 0 (i.e., incoming heartbeats are disabled).

This property is not available at design time.

Data Type

Integer

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks IoT 2020 C++ Edition - Version 20.0 [Build 8265]