TwclServerConnection Class

The base class for all server connections.

Namespace: wclConnections
TObject
  wclConnections.TwclCustomConnection
    wclConnections.TwclServerConnection
      wclConnections.TwclServerDataConnection
type
 TwclServerConnection = class(TwclCustomConnection)
 end;

The TwclServerConnection type exposes the following members.

Show:
 NameDescription
Create

Creates a new server connection. (Overrides TwclCustomConnection.Create.)

Destroy

Frees the server connection. (Overrides TwclCustomConnection.Destroy.)

Top
Show:
 NameDescription
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.)

Top
Show:
 NameDescription
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 OnClosed event.

DoConnect(TwclServerClientConnection,Integer)

Fires the OnConnect event.

DoDisconnect(TwclServerClientConnection,Integer)

Fires the OnDisconnect event.

DoListen

Fires the OnListen event.

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.

Top
Show:
 NameDescription
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.

Top

An application must never create this class directly. Instead of that an application must use high-level components.