クラス rcsc::UDPSocket

UDP/IP connection socket class [詳細]

#include <udp_socket.h>

rcsc::UDPSocketに対する継承グラフ

rcsc::BasicSocket すべてのメンバ一覧

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.

説明

UDP/IP connection socket class


コンストラクタとデストラクタ

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.
戻り値:
the length of sent data if successfuly sent, otherwise -1.

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
戻り値:
the length of received data.

rcsc::BasicSocketを実装しています。


このクラスの説明は次のファイルから生成されました:
librcscに対してThu May 1 15:41:26 2008に生成されました。  doxygen 1.5.0