#include <ServerSocket.h>
Inheritance diagram for ServerSocket:
Public Member Functions | |
ServerSocket (int port) | |
Create server socket. | |
ServerSocket () | |
virtual | ~ServerSocket () |
Destroy server socket. | |
const ServerSocket & | operator<< (const std::string &) const |
Send string to client. | |
const ServerSocket & | operator>> (std::string &) const |
Receive string from cleint. | |
void | accept (ServerSocket &) |
Accept server socket. | |
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 |
|
Create server socket.
Definition at line 28 of file ServerSocket.cpp. References Socket::bind(), Socket::create(), and Socket::listen(). |
|
Definition at line 30 of file ServerSocket.h. |
|
Destroy server socket.
Definition at line 50 of file ServerSocket.cpp. |
|
Accept socket.
Definition at line 116 of file Socket.cpp. References Socket::m_sock. Referenced by accept(). |
|
Accept server socket.
Definition at line 89 of file ServerSocket.cpp. References Socket::accept(). |
|
Bind socket.
Definition at line 68 of file Socket.cpp. References Socket::is_valid(), and Socket::m_addr. Referenced by ServerSocket(). |
|
Connect to the host.
Definition at line 187 of file Socket.cpp. References Socket::is_valid(), and Socket::m_addr. Referenced by ClientSocket::Connect(). |
|
Create socket.
Definition at line 46 of file Socket.cpp. References Socket::is_valid(), and Socket::m_sock. Referenced by ClientSocket::Connect(), and 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(). |
|
Send string to client.
Definition at line 59 of file ServerSocket.cpp. References Socket::send(). |
|
Receive string from cleint.
Definition at line 75 of file ServerSocket.cpp. References Socket::recv(). |
|
Receive string from socket.
Definition at line 155 of file Socket.cpp. References MAXRECV. Referenced by operator>>(), and ClientSocket::operator>>(). |
|
Send string to socket.
Definition at line 136 of file Socket.cpp. Referenced by operator<<(), and ClientSocket::operator<<(). |
|
Set non blocking.
Definition at line 218 of file Socket.cpp. References Socket::m_sock. |