クラス rcsc::TCPSocket

TCP/IP connection socket class [詳細]

#include <tcp_socket.h>

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

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

Public メソッド

 TCPSocket (const char *hostname, const int port)
 constructor for client socket
 ~TCPSocket ()
 destructor. close socket automatically
int connect ()
 make connection
int send (const char *data, const std::size_t len)
 send stream data to the connected host.
int receive (char *buf, const std::size_t len)
 receive stream data from the connected remote host.

説明

TCP/IP connection socket class


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

rcsc::TCPSocket::TCPSocket ( 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::TCPSocket::connect (  ) 

make connection

戻り値:
-1 on error, otherwise 0

int rcsc::TCPSocket::send ( const char *  data,
const std::size_t  len 
) [virtual]

send stream 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::TCPSocket::receive ( char *  buf,
const std::size_t  len 
) [virtual]

receive stream data from the connected remote host.

引数:
buf buffer to receive data
len maximal length of buffer buf
戻り値:
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