ext-uv/tests/500-udp_bind6.phpt
2020-02-15 17:40:10 +01:00

22 lines
378 B
PHP

--TEST--
Check for udp bind
--FILE--
<?php
$udp = uv_udp_init();
uv_udp_bind6($udp, uv_ip6_addr('::1',10000));
uv_udp_recv_start($udp,function($stream, $buffer) {
echo "recv: " . $buffer;
uv_close($stream);
});
$uv = uv_udp_init();
uv_udp_send($uv, "Hello", uv_ip6_addr("::1", 10000), function($uv, $s) {
uv_close($uv);
});
uv_run();
--EXPECT--
recv: Hello