RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TServerClientThread Class

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

Pascal
TServerClientThread = class(TThread);
C++
class TServerClientThread : public TThread;

ScktComp

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. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!