mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 03:53:09 +00:00
bugfix: use temp array for each request
This commit is contained in:
@@ -28,4 +28,16 @@ function sockethelper.writefunc(fd)
|
||||
end
|
||||
end
|
||||
|
||||
function sockethelper.connect(host, port)
|
||||
local fd = socket.open(host, port)
|
||||
if fd then
|
||||
return fd
|
||||
end
|
||||
error(socket_error)
|
||||
end
|
||||
|
||||
function sockethelper.close(fd)
|
||||
socket.close(fd)
|
||||
end
|
||||
|
||||
return sockethelper
|
||||
|
||||
Reference in New Issue
Block a user