Lines Matching refs:sockets
5 $sockets = @stream_socket_pair(STREAM_PF_UNIX, STREAM_SOCK_STREAM, 0);
6 if (!$sockets) die("skip stream_socket_pair() should work");
7 fclose($sockets[0]);
8 fclose($sockets[1]);
18 $sockets = stream_socket_pair(STREAM_PF_UNIX, STREAM_SOCK_STREAM, 0);
19 var_dump($sockets);
21 stream_set_blocking($sockets[1], 0);
25 fwrite($sockets[0], "line start");
26 var_dump(stream_get_line($sockets[1], 8192, $eol)); // Does not returns incomplete line (EOL not fo…
27 var_dump(stream_get_line($sockets[1], 8192, $eol));
28 fwrite($sockets[0], ", line end");
29 fwrite($sockets[0], ", $eol");
30 var_dump(stream_get_line($sockets[1], 8192, $eol)); // Returns full line (EOL found)
31 var_dump(stream_get_line($sockets[1], 8192, $eol)); // Nothing to read
32 var_dump(stream_get_line($sockets[1], 8192, $eol));
34 fwrite($sockets[0], "incomplete line");
35 var_dump(stream_get_line($sockets[1], strlen("incomplete line"), $eol)); // EOL not found but $leng…
37 fwrite($sockets[0], "incomplete line");
38 var_dump(stream_get_line($sockets[1], 8192, $eol)); // Does not returns incomplete line (EOL not fo…
39 var_dump(fread($sockets[1], strlen("incomplete line"))); // Returns buffer readden by stream_get_li…
41 fwrite($sockets[0], "end of file");
42 var_dump(stream_get_line($sockets[1], 8192, $eol)); // Does not returns incomplete line (EOL not fo…
44 fclose($sockets[0]);
45 var_dump(stream_get_line($sockets[1], 8192, $eol)); // Returns incomplete line (End of file)
47 fclose($sockets[1]);