1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/sockets/tests/bug51958.phpt
Ilija Tovilo f39b5c4c25 Close PHP tags in tests
Closes GH-12422
2023-10-18 17:34:10 +02:00

25 lines
534 B
PHP

--TEST--
Bug #51958: socket_accept() fails on IPv6 server sockets
--EXTENSIONS--
sockets
--SKIPIF--
<?php
if (!defined('IPPROTO_IPV6')) {
die('skip IPv6 not available.');
}
if (PHP_OS != "WINNT")
die('skip test relies Winsock\'s error code for WSAEWOULDBLOCK/EAGAIN');
?>
--FILE--
<?php
$listenfd = socket_create(AF_INET6, SOCK_STREAM, SOL_TCP);
socket_bind($listenfd, "::1", 13579);
socket_listen($listenfd);
socket_set_nonblock($listenfd);
$connfd = @socket_accept($listenfd);
echo socket_last_error();
?>
--EXPECT--
10035