ARGoS
3
A parallel, multi-engine simulator for swarm robotics
|
Go to the documentation of this file.
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;
bool IsConnected() const
Returns true if the socket is connected.
The namespace containing all the ARGoS related code.
void Listen(SInt32 n_port, SInt32 n_queue_length=10)
Listens for connections on the specified local port.
Byte array utility class.
void Accept(CTCPSocket &c_socket)
Accept a connection from a client.
void Disconnect()
Close the socket.
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)
signed int SInt32
32-bit signed integer.
const std::string & GetAddress() const
Returns a string containing the IPv4 address in dot notation.
void SendByteArray(const CByteArray &c_byte_array)
Sends the passed byte array through the socket.
int GetStream() const
Returns the socket stream.
unsigned char UInt8
8-bit unsigned integer.
bool ReceiveByteArray(CByteArray &c_byte_array)
Receives the passed byte array through the socket.
void Connect(const std::string &str_hostname, SInt32 n_port)
Connects this socket to the specified hostname and port.