From RAD Studio API Documentation
Jump to: navigation, search



TServerClientThread = class(TThread)


class PASCALIMPLEMENTATION TServerClientThread : public System::Classes::TThread


Type Visibility Source Unit Parent
class public
System.Win.ScktComp System.Win.ScktComp


TServerClientThread is an execution thread used for a single connection to a client socket accepted by a Windows server socket.

TServerWinSocket objects spawn TServerClientThread objects to handle separate client connections in separate execution threads. This allows server sockets to perform slow reading and writing operations with client sockets without adversely affecting the performance on other connections.

TServerClientThread introduces new properties to

Access the TServerWinSocket object that spawned the thread and the TServerClientWinSocket that is connected to the client socket.

Store and access thread-specific data.

Determine if the thread is stored in a thread cache maintained by the TServerWinSocket.

Applications that receive frequent client requests will want to derive a descendant class from TServerClientThread to handle reading and writing to separate clients. This is because TServerClientThread objects use the OnClientRead and OnClientWrite events of the associated server socket. These events are not thread-local.

See Also