/hphp/test/slow/streams/socket-select-index.php
http://github.com/facebook/hiphop-php · PHP · 17 lines · 13 code · 4 blank · 0 comment · 0 complexity · 29c04d73279a30197b3a59840a7160a0 MD5 · raw file
- <?hh
- <<__EntryPoint>>
- function main_socket_select_index() {
- $msg = "Hello";
- $len = strlen($msg);
- $sockets = varray[];
- socket_create_pair(AF_UNIX, SOCK_STREAM, 0, inout $sockets);
- socket_write($sockets[0], $msg, $len);
- $fdset = darray[ 1 => $sockets[1] ];
- $write = $excep = varray[];
- socket_select(inout $fdset, inout $write, inout $excep, 0, 100);
- print_r($fdset);
- }