#include <poll2_socket.h>
Definition at line 59 of file poll2_socket.h.
§ Client()
§ ~Client()
§ Close()
§ Get()
§ Init()
| bool Client::Init |
( |
const char * |
address_, |
|
|
int |
port_ |
|
) |
| |
Initialize the client object and open a specified address and port. Returns false if the socket fails to open or the address is unresolved and returns true otherwise.
Definition at line 103 of file poll2_socket.cpp.
§ RecvMessage()
| int Client::RecvMessage |
( |
char * |
message_, |
|
|
size_t |
length_ |
|
) |
| |
Receive a message from the socket. Returns the number of bytes received. Returns -1 if the receive fails or if the object was not initialized.
Definition at line 120 of file poll2_socket.cpp.
§ SendMessage()
| int Client::SendMessage |
( |
char * |
message_, |
|
|
size_t |
length_ |
|
) |
| |
Send a message to the socket. Returns the number of bytes sent. Returns -1 if the send fails or if the object was not initialized.
Definition at line 129 of file poll2_socket.cpp.
§ from
| struct sockaddr_in serv Client::from |
|
private |
§ hp
| struct hostent* Client::hp |
|
private |
§ init
§ length
| unsigned int Client::length |
|
private |
§ sock
The documentation for this class was generated from the following files: