php
$socket = stream_socket_server ("tcp://127.0.0.1:8888",$errno,$errstr,STREAM_SERVER_BIND | STREAM_SERVER_LISTEN);
if (! $socket) {
die("failed to create a socket");
}
stream_set_blocking ($socket,false);
/ / listen for new connections
$ev = new EvIo ($socket,Ev::READ,function ($watcher) use ($socket,$clients) {
$client = stream_socket_accept($socket);
stream_set_blocking($client,false);
//
$e = new EvIo($client,Ev::READ|Ev::WRITE,function ($watcher) use($client){
$data = stream_get_contents($client);
echo $data;//
/* do{
$data = stream_get_contents($client);
}while($data==false);
,
*/
fclose($client);
$watcher->stop();
});
Ev::run();
});
Ev::run ();
excuse me, what is the cause