CNetChan

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

GetAddress

Method

triangle-exclamation

Returns address string of the remote machine.

Arguments

None.

Returns

Type

Description

string?

IP-address or Steam Server Address.

Example

local chan = game.engine:GetNetChan();
if chan and not chan:IsNull() then
    print(chan:GetAddress());
end

IsLoopback

Method

triangle-exclamation

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


IsNull

Method

Returns whether the channel is stubbed.

Arguments

None.

Returns

Type

Description

bool

true if current channel is a dummy channel.

Example


GetLatency

Method

triangle-exclamation

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

Arguments

None.

Returns

Type

Description

float?

Latency (in seconds).

Example

Last updated