Discuss this help topic in SecureBlackbox Forum

TElSocket.Accept

TElSocket     See also     


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


Accepts an incoming connection.

Declaration

[C#]
    int Accept(int Timeout);
    void Accept(int Timeout, ref TElSocket Socket);

[VB.NET]
    Function Accept(ByVal Timeout As Integer) As Integer
    Sub Accept(ByVal Timeout As Integer, ByRef Socket As TElSocket)

[Pascal]
    function Accept(Timeout : integer) : integer; overload;
    procedure Accept(Timeout : integer; var Socket : TElSocket); overload;

[C++]
    int32_t Accept(int32_t Timeout);
    void Accept(int32_t Timeout, TElSocket &Socket);

[PHP]
    integer Accept(integer $Timeout)
    void Accept(integer $Timeout, TElSocket &$Socket)

[Java]
    void accept(int Timeout, TSBObject Res);
    int accept(int Timeout);

Parameters

  • Timeout - Specifies maximum period of inactivity (in milliseconds) after which operation is cancelled.
  • Socket - A socket object which handles an incoming connection
  • Res -

Return value

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

Description

    This method takes the first connection request from the queue of pending requests and creates a new Socket to handle it.

See also:     Bind     Listen     AsyncConnect    

Discuss this help topic in SecureBlackbox Forum