Discuss this help topic in SecureBlackbox Forum

TElSocket.Listen

TElSocket     See also     


Filter: C#  VB.NET  Pascal  C++  PHP  Java  


Puts the socket into a Listening state.

Declaration

[C#]
    int Listen();

[VB.NET]
    Function Listen() As Integer

[Pascal]
    function Listen : integer;

[C++]
    int32_t Listen();

[PHP]
    integer Listen()

[Java]
    int listen();

Return value

    Returns 0 if the operation was finished successfully, and socket error code otherwise.
    In .NET, if an exception has been rised, -1 may be returned.

Description

    In the Listening state, the Socket will poll for incoming connection attempts.
    You must call the Bind method prior to calling Listen.
    If the function returns 0, you should call Accept to accept an incoming connection.

See also:     Bind     ListenAddress     ListenPort    

Discuss this help topic in SecureBlackbox Forum