1 #include <simgear/compiler.h>
2 #include <simgear/debug/logstream.hxx>
6 #include "sg_socket.hxx"
23 TcpServer::TcpServer()
25 channel = new SGSocket( "", "5500", "tcp" );
31 channel->open( SG_IO_BI );
41 while ((len = channel->readline( buf, sizeof(buf) )) > 0)
43 cout << len << ": " << buf;
51 return channel->close();
58 sglog().setLogLevels( SG_ALL, SG_INFO );
61 SG_LOG( SG_IO, SG_INFO, "Created TCP server" );