From RAD Studio API Documentation
Jump to: navigation, search


property OnListen: TSocketNotifyEvent read FOnListen write FOnListen;


__property OnListen;


Type Visibility Source Unit Parent
event published
System.Win.ScktComp TServerSocket


Occurs just before a server socket is opened for listening.

System.Win.ScktComp.TServerSocket.OnListen inherits from System.Win.ScktComp.TCustomSocket.OnListen. All content below this line refers to System.Win.ScktComp.TCustomSocket.OnListen.

Occurs just before a server socket is opened for listening.

Write an OnListen event handler for a server socket to take specific action just before the socket is opened for listening. OnListen occurs after Address and Port have been bound to the socket connection, but before it is opened. This is the last opportunity to make changes to the socket endpoint before it is opened for listening. Use the SocketHandle property of the Socket parameter for Windows API calls that change the socket.

Server sockets open a socket connection for listening to establish a queue to hold client requests. The connection to a client socket is completed when a request from the queue is accepted.

See Also