diff options
Diffstat (limited to 'tests/modules/socket/tcp/echo_client.lua')
| -rw-r--r-- | tests/modules/socket/tcp/echo_client.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/modules/socket/tcp/echo_client.lua b/tests/modules/socket/tcp/echo_client.lua index 55613cd10..bb2853c95 100644 --- a/tests/modules/socket/tcp/echo_client.lua +++ b/tests/modules/socket/tcp/echo_client.lua @@ -1,3 +1,4 @@ +import("core.base.bytes") import("core.base.socket") function main() @@ -8,10 +9,11 @@ function main() if sock then print("%s: connected!", sock) local count = 0 + local buff = bytes(8192) while count < 10000 do local send = sock:send("hello world..", {block = true}) if send > 0 then - sock:recv(13, {block = true}) + sock:recv(buff, 13, {block = true}) else break end |
