9 #ifndef CClientTCPSocket_H
10 #define CClientTCPSocket_H
21 class CServerTCPSocket;
43 #ifdef MRPT_OS_WINDOWS
46 # if MRPT_WORD_SIZE==64
71 size_t Read(
void *Buffer,
size_t Count);
78 size_t Write(
const void *Buffer,
size_t Count);
81 std::string getLastErrorStr();
100 const std::string &remotePartAddress,
101 unsigned short remotePartTCPPort,
102 unsigned int timeout_ms = 0 );
115 void sendString(
const std::string &str );
156 const int timeoutStart_ms = -1,
157 const int timeoutBetween_ms = -1);
170 const int timeout_ms = -1 );
179 const int timeout_ms = -1
190 const unsigned int timeoutStart_ms = 100,
191 const unsigned int timeoutBetween_ms = 1000
195 size_t getReadPendingBytes();
201 int setTCPNoDelay(
const int &newValue );
210 int setSOSendBufffer(
const int &newValue );
213 int getSOSendBufffer();
static unsigned int DNS_LOOKUP_TIMEOUT_MS
See description of CClientTCPSocket.
#define THROW_EXCEPTION(msg)
uint64_t getTotalBytesCount()
This virtual method has no effect in this implementation over a TCP socket, and its use raises an exc...
unsigned short m_remotePartPort
The TCP port of the remote part of the connection.
A TCP socket that can be wait for client connections to enter.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
#define MRPT_UNUSED_PARAM(a)
Can be used to avoid "not used parameters" warnings from the compiler.
TSeekOrigin
Used in CStream::Seek.
uint64_t getPosition()
This virtual method has no effect in this implementation over a TCP socket, and its use raises an exc...
class BASE_IMPEXP CMessage
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
int m_hSock
The handle for the connected TCP socket, or -1.
std::string m_remotePartIP
The IP address of the remote part of the connection.
uint64_t Seek(uint64_t Offset, CStream::TSeekOrigin Origin=sFromBeginning)
This virtual method has no effect in this implementation over a TCP socket, and its use raises an exc...
A TCP socket that can be connected to a TCP server, implementing MRPT's CStream interface for passing...
A class that contain generic messages, that can be sent and received from a "CClientTCPSocket" object...