BayEOS-PHP
 All Data Structures Namespaces Files Functions Variables Pages
testServer.php
Go to the documentation of this file.
1 <?php
2 $socket = stream_socket_server("tcp://0.0.0.0:8000", $errno, $errstr);
3 if (!$socket) {
4  echo "$errstr ($errno)<br />\n";
5 } else {
6  while (TRUE){
7  if($conn = stream_socket_accept($socket)) {
8  echo "Got connect\n";
9  $count=0;
10  while(fwrite($conn, "1 $count 4\n")){
11  if(fflush($conn))
12  echo "Data send\n";;
13  $count++;
14 
15  sleep(10);
16  }
17  fclose($conn);
18  }
19  }
20 fclose($socket);
21 }
22 
23 
24 
25 ?>
$socket
Definition: testServer.php:2
$count
Definition: BayEOSWriter.php:8