System.Win.ScktComp.TServerWinSocket.Listen
Delphi
procedure Listen(var Name, Address, Service: string; Port: Word; QueueSize: Integer);
C++
HIDESBASE void __fastcall Listen(System::UnicodeString &Name, System::UnicodeString &Address, System::UnicodeString &Service, System::Word Port, int QueueSize);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
protected | System.Win.ScktComp.pas System.Win.ScktComp.hpp |
System.Win.ScktComp | TServerWinSocket |
Description
Opens a listening connection for a server socket.
Server socket components call Listen to open a listening connection.
Listen creates the Windows socket that will make the listening connection, and binds the Windows Internet socket address derived from the parameters to the socket. Listen then generates an OnSocketEvent of type seListen. Finally, Listen opens the socket as a listening connection with a queue that can hold QueueSize client requests, setting the Connected property to true.
The Name, Address, Service, and Port parameters are taken from the Host, Address, Service and Port properties of the server socket component. The QueueSize is set to 5 by TServerSocket.