<<

Contents

Search

>>

 

CLOSE_SOCKET

 

 

Function

 

 

Syntax:

CLOSE_SOCKET(<Handle>)

 

<Handle> = <NUM-EXPRESSION>

 

Meaning:

CLOSE_SOCKET closes a server socket or a client socket:

 

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

 

CLOSE_SOCKET returns the 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 or SERVER_SOCKET

 

Sample:

H% = CLOSE_SOCKET(HANDLE%)
IF H% <> 0
THEN ERRORMES = "Error: " + ERRORTEXT$
ENDIF

 

See also:

CLIENT_SOCKET

CLIENT_SOCKET_READ$

CLIENT_SOCKET_SET_TIMEOUT

CLIENT_SOCKET_WRITE

SERVER_SOCKET