Filter:C# VB.NET C++ (.NET) Java PHP C++ Delphi / Pascal (VCL) C++Builder (VCL)
Fired when new incoming connection is established by the transport
[Delphi / Pascal (VCL)]
property OnNewConnection : TRTNewConnectionEvent;
TRTNewConnectionEvent = procedure( Sender : TObject; Connection : TBaseServerTransportConnection ) of object;
public __property RethyncServer::TRTNewConnectionEvent OnNewConnection;
typedef void (__closure *TRTNewConnectionEvent)( System::TObject* Sender, TBaseServerTransportConnection* Connection );
- 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
The event handler notifies server-side code that new connection has been established.
In standalone application the event handler must allocate an instance of ServerEngine class and set is using BaseServerTransportConnection.Engine property. This lets the application create customized ServerEngine classes for particular needs.
In Rethync Server plugins BaseServerTransportConnection.Engine property is already set when the event is fired.
Custom transports must fire this event to let the application code prepare for proper connection handling.
Got questions or comments about this topic? Tell us about them.