mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-26 04:28:20 +01:00
Fix. Optional IPv6 test
This commit is contained in:
parent
e54f78c61c
commit
bd51d8c1a5
@ -642,7 +642,10 @@ local tcp_methods = {
|
|||||||
"shutdown",
|
"shutdown",
|
||||||
}
|
}
|
||||||
test_methods(socket.tcp(), tcp_methods)
|
test_methods(socket.tcp(), tcp_methods)
|
||||||
test_methods(socket.tcp6(), tcp_methods)
|
do local sock = socket.tcp6()
|
||||||
|
if sock then test_methods(socket.tcp6(), tcp_methods)
|
||||||
|
else io.stderr:write("Warning! IPv6 does not support!\n") end
|
||||||
|
end
|
||||||
|
|
||||||
local udp_methods = {
|
local udp_methods = {
|
||||||
"close",
|
"close",
|
||||||
@ -666,7 +669,10 @@ local udp_methods = {
|
|||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
test_methods(socket.udp(), udp_methods)
|
test_methods(socket.udp(), udp_methods)
|
||||||
test_methods(socket.udp6(), udp_methods)
|
do local sock = socket.tcp6()
|
||||||
|
if sock then test_methods(socket.udp6(), udp_methods)
|
||||||
|
else io.stderr:write("Warning! IPv6 does not support!\n") end
|
||||||
|
end
|
||||||
|
|
||||||
test("partial receive")
|
test("partial receive")
|
||||||
test_partialrecv()
|
test_partialrecv()
|
||||||
|
Loading…
Reference in New Issue
Block a user