]> git.mxchange.org Git - simgear.git/blob - simgear/io/socktest.cxx
Fix a build order problem.
[simgear.git] / simgear / io / socktest.cxx
1 #include <unistd.h>
2
3 #include "sg_socket.hxx"
4
5 int main() {
6
7     SGSocket s( "", "5500", "tcp" );
8
9     if ( !s.open( SG_IO_BI ) ) {
10         cout << "error can't open socket\n";
11     }
12
13     char buf[256];
14
15     while ( true ) {
16         if ( s.readline( buf, 256 ) > 0 ) {
17             cout << "result = " << buf;
18         }
19         sleep(1);
20     }
21 }