1 #include <simgear/compiler.h>
2 #include <simgear/debug/logstream.hxx>
6 #include "sg_socket.hxx"
9 #ifndef SG_HAVE_NATIVE_SGI_COMPILERS
25 TcpServer::TcpServer()
27 channel = new SGSocket( "", "5500", "tcp" );
33 channel->open( SG_IO_BI );
43 while ((len = channel->readline( buf, sizeof(buf) )) > 0)
45 cout << len << ": " << buf;
53 return channel->close();
60 sglog().setLogLevels( SG_ALL, SG_INFO );
63 SG_LOG( SG_IO, SG_INFO, "Created TCP server" );