RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomTcpServer.Accept Method ()

Accepts a connection to a client socket.

Pascal
function Accept: Boolean; overload;
function Accept(var ClientSocket: TCustomIpClient): Boolean; overload;
C++
__fastcall Boolean Accept();
__fastcall Boolean Accept(TCustomIpClient ClientSocket);

Accept is called automatically in response to notifications that a client socket is requesting a connection.  

The Accept method for TCustomTcpServerdoes nothing with the notification. Descendants of TCustomTcpServer that represent listening server sockets override this method to accept the connection to the client socket. In the second declaration of the method, a TCustomIpClient object is created (as the ClientSocket parameter) to handle the connection. 

 

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