socket.connect

From GTA Connected
Jump to: navigation, search

Method Server Only All Games Online and Offline

Server 1.0.0

void socket.connect(string host, int port)

Description

The socket.connect method is used to initiate connection to the specified host/port.

Parameters

Type Name Presence Default Value Description
string host required n/a The destination host to connect to.
int port required n/a The destination port to connect to, between 0 and 65535.

Returns

Success Returns

Type Description
void This method doesn't return any values on success.

Failure Returns

Type Value
void n/a

Types

This method can only be used on the Socket type.

Notes

  • Sockets can be either a server (listens for connections) or a client (connects to another socket). This function starts the socket in client mode.

Examples

There aren't any examples for this method.

Compatibility

There isn't any compatibility information for this method.

Related

Server Related

newSocket

socket.close
socket.connect
socket.delete
socket.send
socket.sendClient
socket.start
socket.stop