cnet_chan
get_address
local chan = game.engine:get_netchan();
if chan and not chan:is_null() then
print(chan:get_address());
endis_loopback
is_null
get_latency
Last updated
local chan = game.engine:get_netchan();
if chan and not chan:is_null() then
print(chan:get_address());
endLast updated
local chan = game.engine:get_netchan();
if chan and not chan:is_null() and chan:is_loopback() then
print('Connected to localhost!');
endlocal chan = game.engine:get_netchan();
if not chan or chan:is_null() then
print('Not connected!');
endlocal chan = game.engine:get_netchan();
if chan and not chan:is_null() then
print('Current latency: ' .. tostring(math.round(chan:get_latency() * 1000.0)) .. 'ms');
end