1 #include <simgear/debug/logstream.hxx>
5 #include "sg_socket.hxx"
22 TcpServer::TcpServer()
24 channel = new SGSocket( "", "5500", "tcp" );
30 channel->open( SG_IO_BI );
40 while ((len = channel->readline( buf, sizeof(buf) )) > 0)
42 cout << len << ": " << buf;
50 return channel->close();
57 sglog().setLogLevels( SG_ALL, SG_INFO );
60 SG_LOG( SG_IO, SG_INFO, "Created TCP server" );