RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TServerSocket.OnAccept Event

Occurs on server sockets just after the connection to a client socket is accepted.

Pascal
property OnAccept: TSocketNotifyEvent;
C++
__property TSocketNotifyEvent OnAccept;

Write an OnAccept event handler for a server socket to take specific action after the connection to a client socket has been accepted. This is the first point when information is available about the local port and IP address that will be used in the server endpoint of the connection. The port number, and possibly the IP address, will differ from those of the listening socket. 

Server sockets open a socket connection for listening to establish a queue to hold client requests. After a request from the queue is accepted by the server socket, an OnAccept event occurs. After the server socket accepts the connection, the client socket completes the connection, and an OnConnect event occurs for the client socket. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!