#include <ClientSocket.h>
Inheritance diagram for ClientSocket:


Public Member Functions | |
| ClientSocket () | |
| Client Socket constructor. | |
| ClientSocket (std::string host, int port) | |
| Create client socket and connect to server. | |
| virtual | ~ClientSocket () |
| Client Socket constructor. | |
| void | Connect (std::string host, int port) |
| Create client socket and connect to server. | |
| const ClientSocket & | operator<< (const std::string &) const |
| Send string to server. | |
| const ClientSocket & | operator>> (std::string &) const |
| Receiver string from server. | |
Private Member Functions | |
| bool | create () |
| Create socket. | |
| bool | bind (const int port) |
| Bind socket. | |
| bool | listen () const |
| Listen to socket. | |
| bool | accept (Socket &) const |
| Accept socket. | |
| bool | connect (const std::string host, const int port) |
| Connect to the host. | |
| bool | send (const std::string) const |
| Send string to socket. | |
| int | recv (std::string &) const |
| Receive string from socket. | |
| void | set_non_blocking (const bool) |
| Set non blocking. | |
| bool | is_valid () const |
|
|
Client Socket constructor.
Definition at line 25 of file ClientSocket.cpp. |
|
||||||||||||
|
Create client socket and connect to server.
Definition at line 35 of file ClientSocket.cpp. References Connect(). |
|
|
Client Socket constructor.
Definition at line 44 of file ClientSocket.cpp. |
|
|
Accept socket.
Definition at line 116 of file Socket.cpp. References Socket::m_sock. Referenced by ServerSocket::accept(). |
|
|
Bind socket.
Definition at line 68 of file Socket.cpp. References Socket::is_valid(), and Socket::m_addr. Referenced by ServerSocket::ServerSocket(). |
|
||||||||||||
|
Connect to the host.
Definition at line 187 of file Socket.cpp. References Socket::is_valid(), and Socket::m_addr. Referenced by Connect(). |
|
||||||||||||
|
Create client socket and connect to server.
Definition at line 54 of file ClientSocket.cpp. References Socket::connect(), and Socket::create(). Referenced by ClientSocket(). |
|
|
Create socket.
Definition at line 46 of file Socket.cpp. References Socket::is_valid(), and Socket::m_sock. Referenced by Connect(), and ServerSocket::ServerSocket(). |
|
|
Definition at line 65 of file Socket.h. Referenced by Socket::bind(), Socket::connect(), Socket::create(), Socket::listen(), and Socket::~Socket(). |
|
|
Listen to socket.
Definition at line 94 of file Socket.cpp. References Socket::is_valid(). Referenced by ServerSocket::ServerSocket(). |
|
|
Send string to server.
Definition at line 73 of file ClientSocket.cpp. References Socket::send(). |
|
|
Receiver string from server.
Definition at line 90 of file ClientSocket.cpp. References Socket::recv(). |
|
|
Receive string from socket.
Definition at line 155 of file Socket.cpp. References MAXRECV. Referenced by ServerSocket::operator>>(), and operator>>(). |
|
|
Send string to socket.
Definition at line 136 of file Socket.cpp. Referenced by ServerSocket::operator<<(), and operator<<(). |
|
|
Set non blocking.
Definition at line 218 of file Socket.cpp. References Socket::m_sock. |
1.3.9.1