uHTTP for C++
uHTTP::Socket Class Reference

#include <Socket.h>

Inheritance diagram for uHTTP::Socket:
uHTTP::SocketCore uHTTP::ServerSocket

Public Member Functions

 Socket ()
 
 ~Socket ()
 
bool listen ()
 
bool bind (int port, const std::string &addr)
 
bool accept (Socket *socket)
 
bool connect (const std::string &addr, int port)
 
ssize_t send (const char *cmd, size_t cmdLen)
 
ssize_t send (const std::string &cmd)
 
ssize_t send (const char c)
 
ssize_t recv (char *buffer, size_t bufferLen)
 
- Public Member Functions inherited from uHTTP::SocketCore
 SocketCore ()
 
virtual ~SocketCore ()
 
void setSocket (SOCKET value)
 
SOCKET getSocket ()
 
bool isBound ()
 
bool close ()
 
void setLocalAddress (const std::string &addr)
 
const char * getLocalAddress ()
 
void setLocalPort (int port)
 
int getLocalPort ()
 
int getType ()
 
int getErrorCode () const
 
bool setReuseAddress (bool on)
 
bool setTimeout (time_t timeout)
 

Additional Inherited Members

- Static Public Member Functions inherited from uHTTP::SocketCore
static size_t GetInstanceCount ()
 
static SocketListGetInstanceList ()
 
- Static Public Attributes inherited from uHTTP::SocketCore
static const int STREAM
 
static const int DGRAM
 
- Protected Member Functions inherited from uHTTP::SocketCore
void setType (int value)
 
void setErrorCode (int code)
 
- Protected Attributes inherited from uHTTP::SocketCore
SOCKET sock
 

Constructor & Destructor Documentation

◆ Socket()

uHTTP::Socket::Socket ( )

◆ ~Socket()

uHTTP::Socket::~Socket ( )

Member Function Documentation

◆ accept()

bool uHTTP::Socket::accept ( Socket * socket)

◆ bind()

bool uHTTP::Socket::bind ( int port,
const std::string & addr )

◆ connect()

bool uHTTP::Socket::connect ( const std::string & addr,
int port )

◆ listen()

bool uHTTP::Socket::listen ( )

◆ recv()

ssize_t uHTTP::Socket::recv ( char * buffer,
size_t bufferLen )

◆ send() [1/3]

ssize_t uHTTP::Socket::send ( const char * cmd,
size_t cmdLen )

◆ send() [2/3]

ssize_t uHTTP::Socket::send ( const char c)

◆ send() [3/3]

ssize_t uHTTP::Socket::send ( const std::string & cmd)

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