* brisk - test/nonblocking.php
*
* Copyright (C) 2014 Matteo Nastasi
- * mailto: nastasi@alternativeoutput.it
+ * mailto: nastasi@alternativeoutput.it
* matteo.nastasi@milug.org
* web: http://www.alternativeoutput.it
*
}
}
-function main()
+function main()
{
GLOBAL $blocking_mode;
if (file_exists($file_socket)) {
unlink($file_socket);
}
-
+
$old_umask = umask(0);
if (($list = stream_socket_server($unix_socket, $err, $errs)) === FALSE) {
return (FALSE);
umask($old_umask);
printf("Blocking mode (listen): %d\n", $blocking_mode);
stream_set_blocking($list, $blocking_mode); // Set the stream to non-blocking
-
+
while(1) {
printf("\nLOOP BEGIN\n");
if (($new_unix = stream_socket_accept($list)) == FALSE) {
}
main();
-?>
\ No newline at end of file
+?>