System.Win.ScktComp.TCustomSocket.OnListen

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnListen: TSocketNotifyEvent read FOnListen write FOnListen;

C++

__property TSocketNotifyEvent OnListen = {read=FOnListen, write=FOnListen};

Properties

Type Visibility Source Unit Parent
event protected
System.Win.ScktComp.pas
System.Win.ScktComp.hpp
System.Win.ScktComp TCustomSocket

Description

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