Go to the documentation of this file.
20 #pragma comment(lib, "WS2_32.LIB")
25 #include <sys/socket.h>
30 #include <sys/types.h>
31 #include <sys/ioctl.h>
33 #include <arpa/inet.h>
34 #include <netinet/in.h>
35 #include <sys/socket.h>
42 unsigned short listenPort,
const std::string & IPaddress,
52 WORD wVersionRequested;
55 wVersionRequested = MAKEWORD(2, 0);
57 if (0 != WSAStartup(wVersionRequested, &wsaData))
61 setupSocket (listenPort, IPaddress, maxConnectionsWaiting);
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::system::VerbosityLevel verbosityLevel=mrpt::system::LVL_INFO)
Constructor that creates the socket, performs binding, and start listening mode.
void setVerbosityLevel(const VerbosityLevel level)
alias of setMinLoggingLevel()
Serial and networking devices and utilities.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
mrpt::system::COutputLogger COutputLogger
#define THROW_EXCEPTION(msg)
unsigned int m_serverSock
The handle for the listening server TCP socket.
#define MRPT_TRY_END
The end of a standard MRPT "try...catch()" block that allows tracing throw the call stack after an ex...
virtual ~CServerTCPSocket()
Dtor.
VerbosityLevel
Enumeration of available verbosity levels.
#define MRPT_TRY_START
The start of a standard MRPT "try...catch()" block that allows tracing throw the call stack after an ...
std::string getLastErrorStr()
Returns a description of the last Sockets error.
GLsizei const GLchar ** string
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST