Go to the documentation of this file.
20 class CClientTCPSocket;
42 unsigned short listenPort,
44 int maxConnectionsWaiting = 50,
60 std::unique_ptr<CClientTCPSocket>
accept (
int timeout_ms = -1);
76 unsigned short listenPort,
const std::string & IPaddress,
77 int maxConnectionsWaiting);
A TCP socket that can be wait for client connections to enter.
void setupSocket(unsigned short listenPort, const std::string &IPaddress, int maxConnectionsWaiting)
Common code called from the platform-dependant constructor.
bool isListening()
Returns true if the socket was successfully open and it's bound to the desired port.
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.
std::unique_ptr< CClientTCPSocket > accept(int timeout_ms=-1)
Waits for an incoming connection (indefinitely, or with a given timeout) The returned object represen...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
unsigned int m_serverSock
The handle for the listening server TCP socket.
virtual ~CServerTCPSocket()
Dtor.
VerbosityLevel
Enumeration of available verbosity levels.
std::string getLastErrorStr()
Returns a description of the last Sockets error.
Versatile class for consistent logging and management of output messages.
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