bugfix: use temp array for each request

This commit is contained in:
Cloud Wu
2014-08-04 16:34:29 +08:00
parent 4673344e1e
commit 7beed39b1d
2 changed files with 15 additions and 8 deletions

View File

@@ -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