8 #include <argos3/core/utility/datatypes/byte_array.h>
9 #include <argos3/core/utility/datatypes/datatypes.h>
26 return m_nStream != -1;
53 void Connect(
const std::string& str_hostname,
66 SInt32 n_queue_length = 10);
141 std::string m_strAddress;
signed int SInt32
32-bit signed integer.
bool ReceiveByteArray(CByteArray &c_byte_array)
Receives the passed byte array through the socket.
void Listen(SInt32 n_port, SInt32 n_queue_length=10)
Listens for connections on the specified local port.
void SendByteArray(const CByteArray &c_byte_array)
Sends the passed byte array through the socket.
unsigned char UInt8
8-bit unsigned integer.
void SendBuffer(const UInt8 *pun_buffer, size_t un_size)
Sends the passed buffer through the socket.
bool ReceiveBuffer(UInt8 *pun_buffer, size_t un_size)
Fills the passed buffer with the data received through the socket.
CTCPSocket(int n_stream=-1)
void Disconnect()
Close the socket.
void Connect(const std::string &str_hostname, SInt32 n_port)
Connects this socket to the specified hostname and port.
const std::string & GetAddress() const
Returns a string containing the IPv4 address in dot notation.
int GetStream() const
Returns the socket stream.
Byte array utility class.
bool IsConnected() const
Returns true if the socket is connected.
The namespace containing all the ARGoS related code.
void Accept(CTCPSocket &c_socket)
Accept a connection from a client.