SOCK.Connect |
nSocket = SOCK.Connect( IPAddress AS STRING, nPort AS INTEGER ) AS INTEGER
Connects to a server on specified IP address using the supplied port and returns a socket that can be used to transmit or receive data on the established connection.
Example:
nSocket = SOCK.Connect( "127.0.0.1", 1221 )
IF ( nSocket > 0 ) AND ( SOCK.IsConnected( nSocket ) ) THEN PRINT "Connect to IP: ";SOCK.GetServerName( nSocket );", Port: ";SOCK.GetPort( nSocket ), ENDIF
|