fix network.tcp_connect
This commit is contained in:
parent
951d2fd1f8
commit
af5902f98e
@ -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={
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user