mirror of
https://github.com/luapower/mysql.git
synced 2025-01-06 08:10:24 +01:00
unimportant
This commit is contained in:
parent
deeea3a4b4
commit
dab134931c
@ -261,15 +261,9 @@ local function _recv(self, sz)
|
|||||||
self.buf = buf
|
self.buf = buf
|
||||||
end
|
end
|
||||||
local buf = buf(sz)
|
local buf = buf(sz)
|
||||||
local sock = self.sock
|
local n, err = self.sock:recvall(buf, sz)
|
||||||
local offset = 0
|
if not n then return nil, err end
|
||||||
while sz > 0 do
|
return ffi.string(buf, n)
|
||||||
local n, err = sock:recv(buf + offset, sz)
|
|
||||||
if not n then return nil, err end
|
|
||||||
sz = sz - n
|
|
||||||
offset = offset + n
|
|
||||||
end
|
|
||||||
return ffi.string(buf, offset)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function _recv_packet(self)
|
local function _recv_packet(self)
|
||||||
|
Loading…
Reference in New Issue
Block a user