Xbasic

INET::Socket::Accept Method

Syntax

CallResult Result = INET::Socket::Accept(AcceptedSocket BYREF as INET::Socket [, Timeout as N [, HandshakeReadTimeout as N = 500 ]])

Arguments

Result

A CallResult Object that provides status for the connection.

AcceptedSocket BYREF

An INET::Socket object.

Timeout

Optional. Numeric

HandshakeReadTimeout

N = 500

Description

Accept a new connection (the socket must already be listening). Returns a status object with information about the success of the call If the call is successful, AcceptedSocket contains the new instance of INET::Socket. HandshakeReadTimeout is appropriate for SSL sockets only.

The INET::Socket::Accept() method accepts a new connection (the socket must already be listening). It returns a status object with information about the success of the call. If the call is successful, AcceptedSocket contains the new instance of INET::Socket.

Example

dim Result as CallResult
dim MyListener as INET::Socket
Result = MyListener.Accept(AcceptedSocket, 750)
if Result.Success then
...

Another example

Result = MyListener.Accept(AcceptedSocket, 750)
         if Result.Success then 
         ...

See Also