OPCAE.NET Reference Manual
SetKeepAlive Method
See Also  Send Feedback
OPCAE.NET Namespace > EventSubscriptionMgt Class : SetKeepAlive Method

KeepAliveTime
The maximum amount of time (in milliseconds) the client expects to receive a new subscription callback since the last subscription callback. A value of zero indicates the client does not wish to receive any keep-alive callbacks.
RevisedKeepAliveTime
The KeepAliveTime the server is actually providing, which may differ from KeepAliveTime.

Glossary Item Box

Clients can set the keep-alive time for a subscription to cause the server to provide client callbacks on the subscription when there are no new events to report. Clients can then be assured of the health of the server and subscription without resorting to pinging the server with calls to GetStatus(). Using this facility, a client can expect a callback (data or keep-alive) within the specified keep-alive time. Servers shall reset their keep-alive timers when real data is sent (i.e. it is not acceptable to constantly send the keep-alive callback at a fixed period equal to the keep-alive time irrespective of data callbacks).

Syntax

Visual Basic (Declaration) 
Public Function SetKeepAlive( _
   ByVal KeepAliveTime As Integer, _
   ByRef RevisedKeepAliveTime As Integer _
) As Integer
C# 
public int SetKeepAlive( 
   int KeepAliveTime,
   out int RevisedKeepAliveTime
)

Parameters

KeepAliveTime
The maximum amount of time (in milliseconds) the client expects to receive a new subscription callback since the last subscription callback. A value of zero indicates the client does not wish to receive any keep-alive callbacks.
RevisedKeepAliveTime
The KeepAliveTime the server is actually providing, which may differ from KeepAliveTime.

Return Value

HRESULTS error/success code.

Requirements

Target Platforms: Windows 7/8/10, Windows Server 2003/2008/2012/2016, .NET 4.x

See Also

© 2002-2018 Advosol Inc. All Rights Reserved.