<<

Contents

Search

>>

 

CLIENT_SOCKET

 

 

Function

 

 

Syntax:

CLIENT_SOCKET(<Host>,<Port>,<SSL>)

 

<Host>

= <STRING-EXPRESSION>

<Port>

= <NUM-EXPRESSION>

<SSL>

= <NUM-EXPRESSION>

 

 

Meaning:

CLIENT_SOCKET sets up a connection to the Server-Socket at the port <Port> on the computer <Host>. <Host> contains the IP address or the name of the server.

 

If <SSL> <> 0, a safe SSL connection is used.

 

CLIENT_SOCKET returns an identification number (Handle) for the client socket if no error occurred, otherwise –1. In the case of an error the variable ERRORTEXT$ contains the error report.

 

Parameter:

Host

IP address or name of server

Port

Port number

SSL

SSL connection

 

Sample:

IP$ = "80.125.33.234"

PORT% = 2000

SSL% = 1

HANDLE% = CLIENT_SOCKET(IP$,PORT%,SSL%)

IF HANDLE% = -1

THEN ERRORMES = ERRORTEXT$

ENDIF

 

See also:

CLIENT_SOCKET_READ$

CLIENT_SOCKET_SET_TIMEOUT

CLIENT_SOCKET_WRITE

CLOSE_SOCKET

SERVER_SOCKET