#include <udp_socket.h>
rcsc::UDPSocketに対する継承グラフ
Public メソッド | |
UDPSocket (const int port) | |
constructor for server socket | |
UDPSocket (const char *hostname, const int port) | |
constructor for client socket | |
~UDPSocket () | |
destructor. close socket automatically | |
int | send (const char *data, const std::size_t len) |
send diagram data to the connected host. | |
int | receive (char *buf, const std::size_t len) |
receive diagram data from the connected remote host. |
rcsc::UDPSocket::UDPSocket | ( | const int | port | ) | [explicit] |
constructor for server socket
port | port number to receive packet. |
rcsc::UDPSocket::UDPSocket | ( | const char * | hostname, | |
const int | port | |||
) |
constructor for client socket
hostname | remote host name (or IP address) | |
port | port number to send packet |
int rcsc::UDPSocket::send | ( | const char * | data, | |
const std::size_t | len | |||
) | [virtual] |
send diagram data to the connected host.
data | the pointer to the data to be sent. | |
len | the length of data. |
rcsc::BasicSocketを実装しています。
int rcsc::UDPSocket::receive | ( | char * | buf, | |
const std::size_t | len | |||
) | [virtual] |
receive diagram data from the connected remote host.
buf | buffer to receive data | |
len | maximal length of buffer buf | |
overwrite_dist_addr | if this value is true, set distination address to sender address of this packet. |
0 | error occured and errno is EWOULDBLOCK | |
-1 | error occured |
rcsc::BasicSocketを実装しています。