OutgoingHeartbeat Property

Specifies the class-to-server heartbeat timing.

Object Oriented Interface

public function getOutgoingHeartbeat();
public function setOutgoingHeartbeat($value);

Procedural Interface

ipworksiot_stomp_get($res, 15 );
ipworksiot_stomp_set($res, 15, $value );

Default Value

0

Remarks

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

For information about incoming (server-to-class) heartbeats; see the IncomingHeartbeat property.

Before Connecting

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

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

After Connecting

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

As the outgoing heartbeat interval negotiation notes above imply, it is possible that the agreed-upon outgoing heartbeat interval may either be larger than the class's supported minimum, or may be 0 (i.e., outgoing 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 PHP Edition - Version 20.0 [Build 8265]