1 2 3 4 5 6 7 8 9 10 11 12 13
GAME.crashy() local socket = net.newsocket(net.PAIR) socket:connect("tcp://127.0.0.1:5555") function socket:receive(stream) local message = stream:readstring() assert(message == "pong") end socket:send(function(stream) stream:writestring("ping") end) GAME.exit()