TROSynapseServerSocket
Overview
The TROSynapseServerSocket class is a Synapse based server socket for accepting incoming connections. It uses a 'thread per connection' approach.
You can use this class to build a custom server application which uses proprietary protocols.
Location
- Unit: uROSynapseServerSocket.pas
- Ancestry: TROSynapseServerSocket
constructor Create
Creates a new instance.
constructor Create
Active
Reports if the server is now active or controls the server's state. If the server activates its binds socket with BindList addresses, it sets a socket in Listen
mode and creates a thread to accept incoming connections.
property Active: Boolean read write
BindList
List of IP
addresses on which the server accepts connections.
property BindList: TStrings read
IgnoreSSL
property IgnoreSSL: Boolean read write
MaxThreads
Restricts the maximum connection (client threads) count (100
by default).
property MaxThreads: Integer read write
OnMaxThreadLimitReached
Fires when an incoming connection is rejected due to the exceedance of the MaxThreads.
property OnMaxThreadLimitReached: TThreadMethod read write
OnNewConnection
Fires when a new client thread is started.
property OnNewConnection: TRONewConnection read write
delegate: procedure OnNewConnection(Sender: TObject; aSocket: TTCPBlockSocket)
OnNewSocket
Fires when the server accepts a connection and allows to use a custom descendant of the TTCPBlockSocket class to serve the client connection.
property OnNewSocket: TRONewSocketEvent read write
delegate: function OnNewSocket(Sender: TObject; aSock: TSocket): TTCPBlockSocket
Port
Used when the BindList is empty to bind to a Port on a default interface.
property Port: Integer read write
Sock
Access to the TTCPBlockSocket which is used to listen to incoming connections.
property Sock: TTCPBlockSocket read
Active
Reports if the server is now active or controls the server's state. If the server activates its binds socket with BindList addresses, it sets a socket in Listen
mode and creates a thread to accept incoming connections.
property Active: Boolean read write
BindList
List of IP
addresses on which the server accepts connections.
property BindList: TStrings read
IgnoreSSL
property IgnoreSSL: Boolean read write
MaxThreads
Restricts the maximum connection (client threads) count (100
by default).
property MaxThreads: Integer read write
OnMaxThreadLimitReached
Fires when an incoming connection is rejected due to the exceedance of the MaxThreads.
property OnMaxThreadLimitReached: TThreadMethod read write
Port
Used when the BindList is empty to bind to a Port on a default interface.
property Port: Integer read write
Sock
Access to the TTCPBlockSocket which is used to listen to incoming connections.
property Sock: TTCPBlockSocket read
constructor Create
Creates a new instance.
constructor Create
OnNewConnection
Fires when a new client thread is started.
property OnNewConnection: TRONewConnection read write
delegate: procedure OnNewConnection(Sender: TObject; aSocket: TTCPBlockSocket)
OnNewSocket
Fires when the server accepts a connection and allows to use a custom descendant of the TTCPBlockSocket class to serve the client connection.
property OnNewSocket: TRONewSocketEvent read write
delegate: function OnNewSocket(Sender: TObject; aSock: TSocket): TTCPBlockSocket
- Synapse