13 #include <MRPT/config.h> 15 #ifdef MRPT_OS_WINDOWS 18 #if (__BORLANDC__) || (_MSC_VER) 19 # pragma comment (lib,"WS2_32.LIB") 32 unsigned short listenPort,
34 int maxConnectionsWaiting,
35 mrpt::utils::VerbosityLevel verbosityLevel
37 COutputLogger(
"CServerTCPSocket")
40 setVerbosityLevel(verbosityLevel);
44 WORD wVersionRequested;
47 wVersionRequested = MAKEWORD( 2, 0 );
49 if ( 0 != WSAStartup( wVersionRequested, &wsaData ) )
53 setupSocket( listenPort, IPaddress, maxConnectionsWaiting );
71 #endif // MRPT_OS_WINDOWS
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
#define THROW_EXCEPTION(msg)
void setupSocket(unsigned short listenPort, const std::string &IPaddress, int maxConnectionsWaiting)
Common code called from the platform-dependant constructor.
CServerTCPSocket(unsigned short listenPort, const std::string &IPaddress=std::string("127.0.0.1"), int maxConnectionsWaiting=50, mrpt::utils::VerbosityLevel verbosityLevel=mrpt::utils::LVL_INFO)
Constructor that creates the socket, performs binding, and start listening mode.
virtual ~CServerTCPSocket()
Dtor.
int m_serverSock
The handle for the listening server TCP socket.
std::string getLastErrorStr()
Returns a description of the last Sockets error.
GLsizei const GLchar ** string