RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TTcpServer.OnAccept Event

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

Pascal
property OnAccept: TSocketAcceptEvent;
C++
__property TSocketAcceptEvent 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 is used in the server endpoint of the connection. The port number, and possibly the IP address, differs 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. 

 

Active 

OnConnect 

OnListening

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