--TEST--
Streams Based Unix Domain Datagram Loopback test
--SKIPIF--
-<?php
+<?php # vim:ft=php:
if (array_search("udg",stream_get_transports()) === false)
- die('No support for UNIX domain sockets.');
+ die('SKIP No support for UNIX domain sockets.');
?>
--FILE--
<?php
$uniqid = uniqid();
if (file_exists("/tmp/$uniqid.sock"))
- die('Temporary socket already exists.');
+ die('Temporary socket /tmp/$uniqid.sock already exists.');
/* Setup socket server */
$server = stream_socket_server("udg:///tmp/$uniqid.sock", $errno, $errstr, STREAM_SERVER_BIND);
--TEST--
Streams Based IPv6 UDP Loopback test
--SKIPIF--
-<?php
- /* If IPv6 is supported on the platform this will error out with code 111 - Connection refused.
- If IPv6 is NOT supported, $errno will be set to something else (indicating parse/getaddrinfo error)
- Note: Might be a good idea to export an IPv6 support indicator (such as AF_INET6 exported by ext/sockets) */
+<?php # vim:ft=php:
+ /* If IPv6 is supported on the platform this will error out with code 111 -
+ * Connection refused. If IPv6 is NOT supported, $errno will be set to
+ * something else (indicating parse/getaddrinfo error)
+ * Note: Might be a good idea to export an IPv6 support indicator
+ * (such as AF_INET6 exported by ext/sockets), however, since we
+ * cannot tell for sure if IPv6 works until we probe it at run time,
+ * this isn't really practical.
+ */
+
@stream_socket_client('tcp://[::1]:0', $errno);
if ($errno != 111) die('skip IPv6 not supported.');
?>
--TEST--
Streams Based Unix Domain Loopback test
--SKIPIF--
-<?php
+<?php # vim:ft=php:
if (array_search("unix",stream_get_transports()) === false)
- die('No support for UNIX domain sockets.');
+ die('SKIP No support for UNIX domain sockets.');
?>
--FILE--
<?php
php_stream_xport_register("tcp", php_stream_generic_socket_factory TSRMLS_CC) == SUCCESS
&&
php_stream_xport_register("udp", php_stream_generic_socket_factory TSRMLS_CC) == SUCCESS
-#ifdef AF_UNIX
+#if defined(AF_UNIX) && !(defined(PHP_WIN32) || defined(__riscos__) || defined(NETWARE))
&&
php_stream_xport_register("unix", php_stream_generic_socket_factory TSRMLS_CC) == SUCCESS
&&