vision/src/metaserver.lua

20 lines
574 B
Lua
Raw Normal View History

2023-09-11 22:44:36 +00:00
local shared = assert( require 'shared' )
local socket = assert( require 'socket' )
local udp = assert( socket.udp() )
--Servers broadcast their information here.
--The metaserver builds a list of available servers. ( available meaning, "broadcasted in last ten heartbeats" )
--Clients ask the metaserver for this list ( maybe with some filter? )
local serverInfo = {}
local serverIPs = {}
local clientIPs = {}
local function Parse( packet, ip, port )
end
print( "Starting Metaserver", socket.gettime() )
repeat
until socket.sleep( 2.0 - (socket.gettime() % 2.0) )