--- /dev/null
+#!/usr/bin/php
+<?php
+
+$FILE_SOCKET = "/tmp/test001.sock";
+$UNIX_SOCKET = "unix://$FILE_SOCKET";
+if (file_exists($FILE_SOCKET)) {
+ unlink($FILE_SOCKET);
+}
+
+$old_umask = umask(0);
+if (($list = stream_socket_server($UNIX_SOCKET, $err, $errs)) === FALSE) {
+ exit(11);
+}
+umask($old_umask);
+
+$new_socket = stream_socket_accept($list);
+
+$fp = ancillary_getstream($new_socket);
+printf("FP: %d\n", $fp);
+
+
+if ($fp == FALSE)
+ printf("ERROR\n");
+else
+ printf("GOOD\n");
+
+fwrite($fp, "DI QUI CI PASSO2");
+fflush($fp);
+fclose($fp);
+
+?>
\ No newline at end of file