Public Member Functions | Protected Member Functions | Private Attributes | List of all members
URServer Class Reference

#include <server.h>

Inheritance diagram for URServer:
Inheritance graph
[legend]

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)
 

Detailed Description

Definition at line 31 of file server.h.

Constructor & Destructor Documentation

URServer::URServer ( int  port)

Definition at line 28 of file server.cpp.

URServer::~URServer ( )

Definition at line 32 of file server.cpp.

Member Function Documentation

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.

bool URServer::open ( int  socket_fd,
struct sockaddr *  address,
size_t  address_len 
)
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.

Member Data Documentation

TCPSocket URServer::client_
private

Definition at line 35 of file server.h.

int URServer::port_
private

Definition at line 34 of file server.h.


The documentation for this class was generated from the following files:


ur_modern_driver
Author(s): Thomas Timm Andersen, Simon Rasmussen
autogenerated on Fri Jun 26 2020 03:37:01