TwclServerConnection Class
The base class for all server connections.
wclConnections.TwclCustomConnection
wclConnections.TwclServerConnection
wclConnections.TwclServerDataConnection
type TwclServerConnection = class(TwclCustomConnection) end;
The TwclServerConnection type exposes the following members.
Name | Description | |
---|---|---|
Create | Creates a new server connection. (Overrides TwclCustomConnection.Create.) | |
Destroy | Frees the server connection. (Overrides TwclCustomConnection.Destroy.) |
Name | Description | |
---|---|---|
ClientsCount | Gets the number of connected clients. | |
Clients[Integer] | Gets a connected client by its index. | |
OnListen | The event fires when the serve ris ready to accept incomming connections (is in listening state). | |
Receiver | Gets the connection message receiver object. (Inherited from TwclCustomConnection.) | |
State | Gets the connection state. | |
ThreadId | Gets the connection's thread ID. (Inherited from TwclCustomConnection.) |
Name | Description | |
---|---|---|
Close | The method disconnects all connected clients and closes the server. | |
CreateNewClientConnection(Pointer,Cardinal) | Sends a notification to the main thread to create and init new client connection. | |
DoClosed(Integer) | Fires the | |
DoConnect(TwclServerClientConnection,Integer) | Fires the | |
DoDisconnect(TwclServerClientConnection,Integer) | Fires the | |
DoListen | Fires the | |
Enter | Enters the connection's critical section. (Inherited from TwclCustomConnection.) | |
HalClose | Implements a hardware-dependent method to stop listening. | |
HalCreateClient | The method crteates a hardware and transport-dependent client connection. | |
HalListen(THandle) | Implements a hardware-dependent method for listening the client connections. | |
HalPrepare | Implements a hardware-dependent code that prepares for listening. | |
InternalClose(Integer) | Closes the server. | |
Leave | Exists *leaves) the connection's critical section. (Inherited from TwclCustomConnection.) | |
Listen | The method starts listening for client connections. | |
MessageReceived(TwclMessage) | The message receiver calls this method when a new notification message has been received. (Overrides TwclCustomConnection.MessageReceived(TwclMessage).) | |
SetClientEvents(TwclServerClientConnection) | The method sets the client's event handlers. |
Name | Description | |
---|---|---|
OnClosed | The event fires when the server is closed. | |
OnConnect | The event fires when a remote client is connected to the server. | |
OnDisconnect | The event fires when a remote client has disconnected from the server. |
An application must never create this class directly. Instead of that an application must use high-level components.