Skip to content

Networking

Dickson Law edited this page Sep 8, 2017 · 1 revision

TcpClient([port])

Return a new TCP client socket. Optionally you can provide a port for it to connect from.

Example

chat_channel = TcpClient(9007);
client = TcpClient();

TcpServer([port, [maxclients, [raw]]])

Return a new TCP server socket. Optionally you can provide a port to listen to (default: $7000 | (game_id & $0FFF)), the maximum number of clients (default: 100) and whether it is raw (default: false).

Example

server = TcpServer();
message_server = TcpServer(9007, 1000);

UdpClient([port])

Return a new UDP client socket. Optionally you can provide a port to connect from.

Example

pinger = UdpClient(7042);
client = UdpClient();

UdpServer([port, [maxclients, [raw]]])

Return a new UDP server socket. Optionally you can provide a port to listen to (default: $7000 | (game_id & $0FFF)), the maximum number of clients (default: 100) and whether it is raw (default: false).

Example

server = UdpServer(7055, 100, false);
broadcaster = UdpServer();
Clone this wiki locally