EHS Embedded HTTP Server
1.5.0.132
|
EHSConnection abstracts the concept of a connection to an EHS application. More...
#include <ehsconnection.h>
Public Member Functions | |
std::string | GetRemoteAddress () const |
returns the remote address of the connection. | |
int | GetRemotePort () const |
returns the remote port of the connection. | |
std::string | GetLocalAddress () const |
returns the local address of the connection. | |
int | GetLocalPort () const |
returns the local port of the connection. | |
std::string | GetAddress () const |
returns address of the connection. | |
int | GetPort () const |
returns client port of the connection. | |
bool | Disconnected () const |
returns whether the client has disconnected from us. | |
bool | IsRaw () const |
returns whether the this connection is in raw mode. | |
void | AddResponse (ehs_autoptr< GenericResponse > ehs_rvref response) |
adds a response to the response list and sends as many responses as are ready | |
void | EnableIdleTimeout (bool enable=true) |
Enable/Disable idle-timeout handling for this connection. | |
void | EnableKeepAlive (bool enable=true) |
Enable/Disable TCP keepalive on the underlying socket. | |
Friends | |
class | EHSServer |
EHSConnection abstracts the concept of a connection to an EHS application.
It stores file descriptor information, unhandled data, and the current state of the request
void EnableIdleTimeout | ( | bool | enable = true | ) | [inline] |
Enable/Disable idle-timeout handling for this connection.
enable | If true, idle-timeout handling is enabled, otherwise the socket may stay open forever. When creating an EHSConnection, this is initially enabled. |
Definition at line 140 of file ehsconnection.h.
void EnableKeepAlive | ( | bool | enable = true | ) |
Enable/Disable TCP keepalive on the underlying socket.
This enables detection of "dead" sockets, even when idle-timeout handling is disabled.
enable | If true, enable TCP keepalive. When creating an EHSConnection, this is initially disabled. |
std::string GetAddress | ( | ) | const [inline] |
returns address of the connection.
Definition at line 116 of file ehsconnection.h.
References GetRemoteAddress().
int GetPort | ( | ) | const [inline] |
returns client port of the connection.
Definition at line 123 of file ehsconnection.h.
References GetRemotePort().