cnet_chan

Provides a way to interface with a Network Channel's class.

get_address

Method

Returns address string of the remote machine.

Arguments

None.

Returns

Type

Description

string?

IP-address or Steam Server Address.

Example

local chan = game.engine:get_netchan();
if chan and not chan:is_null() then
    print(chan:get_address());
end

is_loopback


Method

Returns whether the current channel is connected to the local machine (loopback address).

Arguments

None.

Returns

Type

Description

bool?

true if connected to the local machine.

Example


is_null

Method

Returns whether the channel is stubbed.

Arguments

None.

Returns

Type

Description

bool

true if current channel is a dummy channel.

Example


get_latency

Method

Returns current latency to the remote server (in seconds).

Arguments

None.

Returns

Type

Description

float?

Latency (in seconds).

Example

Last updated