<<

Contents

Search

>>

 

CLIENT_SOCKET_SET_TIMEOUT

 

 

Function

 

 

Syntax:

CLIENT_SOCKET_SET_TIMEOUT(<Handle>,<Milliseconds>)

 

<Handle>

= <NUM-EXPRESSION>

<Milliseconds>

= <NUM-EXPRESSION>

 

 

Meaning:

This function specifies how many <Milliseconds> the function CLIENT_SOCKET_READ$ waits for input characters.

 

After the waiting time has expired the function CLIENT_SOCKET_READ$ is closed and ERRORTEXT$ contains the error report.  

 

If <Milliseconds> <= 0, the program waits endlessly.

 

<Handle> is the identification number returned by the function CLIENT_SOCKET.

 

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

 

Parameter:

Handle

Handle of CLIENT_SOCKET

Milliseconds

Timeout in milliseconds

 

Sample:

H% = CLIENT_SOCKET_SET_TIMEOUT(HANDLE%,1000)

IF H% <> 0

THEN ERRORMES = "Error " + ERRORTEXT$

ENDIF

 

See also:

CLIENT_SOCKET

CLIENT_SOCKET_READ$

CLIENT_SOCKET_WRITE

CLOSE_SOCKET

SERVER_SOCKET