BayEOS-PHP
Main Page
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
bayeos-socket-php
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
$socket
Definition:
testServer.php:2
$count
$count
Definition:
BayEOSWriter.php:8
Generated on Wed Jul 22 2015 13:09:58 for BayEOS-PHP by
1.8.6