<<

Contents

Search

>>

 

SERVER_SOCKET_SET_TIMEOUT

 

 

Function

 

 

Syntax:

SERVER_SOCKET_SET_TIMEOUT(<Handle of Server Socket>,<Timeout in Milliseconds>)

 

<Handle of Server Socket>

= <NUM-EXPRESSION>

<Timeout in Milliseconds>

= <NUM-EXPRESSION>

 

 

Meaning:

Timeout for automatic disconnection of a client.

 

This function specifies whether and when the connection to a Client Socket is automatically disconnected. <Milliseconds> defines the time interval.

 

If <Milliseconds> > 0, the connection to the Client Socket is automatically disconnected if no data from the Client Socket have been received for one time interval. If <Milliseconds> <= 0, the connection is never disconnected automatically.

 

SERVER_SOCKET_SET_TIMEOUT returns the result 0 if no error occurred, otherwise –1. In the case of an error the variable ERRORTEXT$ contains the error report.

 

Parameter:

Handle of Server Socket

Handle which has been returned by SERVER_SOCKET.

Timeout in Milliseconds

Timeout interval

 

Sample:

H% = SERVER_SOCKET_SET_TIMEOUT(HANDLE%,10000)

IF H% <> 0

THEN … Error …

ENDIF

 

See also:

SERVER_SOCKET

SERVER_SOCKET_READ$

SERVER_SOCKET_WRITE

SERVER_SOCKET_GET_CLIENT_ADDRESS$

CLOSE_SOCKET

CLIENT_SOCKET