#include <server.h>
Public Member Functions | |
bool | accept () |
bool | bind () |
void | disconnectClient () |
std::string | getIP () |
bool | readLine (char *buffer, size_t buf_len) |
URServer (int port) | |
bool | write (const uint8_t *buf, size_t buf_len, size_t &written) |
~URServer () | |
Protected Member Functions | |
virtual bool | open (int socket_fd, struct sockaddr *address, size_t address_len) |
Private Attributes | |
TCPSocket | client_ |
int | port_ |
Additional Inherited Members | |
Private Member Functions inherited from TCPSocket | |
void | close () |
std::string | getIP () |
int | getSocketFD () |
SocketState | getState () |
bool | read (char *character) |
bool | read (uint8_t *buf, size_t buf_len, size_t &read) |
bool | setSocketFD (int socket_fd) |
TCPSocket () | |
bool | write (const uint8_t *buf, size_t buf_len, size_t &written) |
virtual | ~TCPSocket () |
virtual void | setOptions (int socket_fd) |
bool | setup (std::string &host, int port) |
URServer::URServer | ( | int | port | ) |
Definition at line 28 of file server.cpp.
URServer::~URServer | ( | ) |
Definition at line 32 of file server.cpp.
bool URServer::accept | ( | ) |
Definition at line 75 of file server.cpp.
bool URServer::bind | ( | ) |
Definition at line 61 of file server.cpp.
void URServer::disconnectClient | ( | ) |
Definition at line 97 of file server.cpp.
std::string URServer::getIP | ( | ) |
Definition at line 37 of file server.cpp.
|
protectedvirtual |
Reimplemented from TCPSocket.
Definition at line 54 of file server.cpp.
bool URServer::readLine | ( | char * | buffer, |
size_t | buf_len | ||
) |
Definition at line 110 of file server.cpp.
bool URServer::write | ( | const uint8_t * | buf, |
size_t | buf_len, | ||
size_t & | written | ||
) |
Definition at line 105 of file server.cpp.