1 #include <simgear/compiler.h>
2 #include <simgear/debug/logstream.hxx>
6 #include "sg_socket.hxx"
24 TcpServer::TcpServer()
26 channel = new SGSocket( "", "5500", "tcp" );
29 TcpServer::~TcpServer()
37 channel->open( SG_IO_BI );
47 while ((len = channel->readline( buf, sizeof(buf) )) > 0)
49 cout << len << ": " << buf;
57 return channel->close();
64 sglog().setLogLevels( SG_ALL, SG_INFO );
67 SG_LOG( SG_IO, SG_INFO, "Created TCP server" );