fix network.tcp_connect

This commit is contained in:
MihailRis 2024-11-27 17:50:53 +03:00
parent 951d2fd1f8
commit af5902f98e

View File

@ -46,10 +46,10 @@ local Socket = {__index={
network.tcp_connect = function(address, port, callback) network.tcp_connect = function(address, port, callback)
local socket = setmetatable({id=0}, Socket) local socket = setmetatable({id=0}, Socket)
return setmetatable({id=network.__connect(address, port, function(id) socket.id = network.__connect(address, port, function(id)
socket.id = id
callback(socket) callback(socket)
end)}, Socket) end)
return socket
end end
local ServerSocket = {__index={ local ServerSocket = {__index={