Filter:C# VB.NET C++ (.NET) Java PHP C++ Delphi / Pascal (VCL) C++Builder (VCL)
Fired after connection is closed
Public Event OnConnectionClosed As Rethync.Server.ConnectionClosedEvent
Rethync.Server.ConnectionClosedEvent( ByVal Sender As Object, ByVal Connection As BaseServerTransportConnection, ByVal Graceful as Boolean )
[Delphi / Pascal (VCL)]
property OnConnectionClosed : TRTConnectionClosedEvent;
TRTConnectionClosedEvent = procedure( Sender : TObject; Connection : TBaseServerTransportConnection, Graceful: boolean ) of object;
public __property RethyncServer::TRTConnectionClosedEvent OnConnectionClosed;
typedef void (__closure *TRTConnectionClosedEvent)( System::TObject* Sender, TBaseServerTransportConnection* Connection, bool Graceful );
- Sender - Contains the reference to the object that fired an event
- Connection - Contains a transport-specific reference to descendant of BaseServerTransportConnection object which handles particular connection
- Graceful - True if connection was closed in response to session close request from the client and False if connection expired or was terminated
The event handler notifies server-side code that connection has been closed.
This is mainly notification event in which the application can dispose of allocated Engine (if needed) and perform other finalization.
Custom transports must fire this event to let the application code properly finalize connection and dispose of allocated resources.
Got questions or comments about this topic? Tell us about them.