BaseServerTransport class is a descendant of BaseTransport class and an ancestor of server-side transport classes in Rethync SDK. It is used to handle synchronization requests from the client to the server.
BaseServerTransport does not have own methods though descendant classes can introduce transport-specific methods.
You can create descendants of BaseServerTransport to implement custom transport mechanisms. The requirement is to fire OnNewConnection event (to notify the application code about new connection) and to implement a descendant of BaseServerTransportConnection, which will serve incoming connection and pass requests to the server engine. Existing transport classes can be used as a reference.
Implementations of server transports must obey the value of SessionTimeout property and cleanup "orphan" sessions. It is not necessary to clean up sessions at exactly specified interval, but cleanup must be performed if the timeout has passed after previous cleanup.
|SessionTimeout||Specifies time of inactivity after which the session is closed by the server|
|Active||Indicates whether the transport is ready to use|
|setEvents||Sets a reference to the object, which implements an event handler|
|Activate||Activates a transport|
|Deactivate||Deactivates a transport|
Events of this class are implemented as IBaseServerTransportEvents interface in Java, C++ and PHP.
|OnConnectionClosed||Fired after connection is closed|
|OnNewConnection||Fired when new incoming connection is established by the transport|
- Namespace: Rethync.Server
- Assembly: Rethync.Server
- Namespace: com.rethync.server
- Package: Rethync.Server.jar
- Header: RethyncServer.h
- Library: RethyncSDK.lib
- Unit: RethyncServer
- Package: RethyncServer
Got questions or comments about this topic? Tell us about them.