Implemented Util::Config::serveForkedSocket(), added Socket::Connection::drop() function for dropping unused sockets.

This commit is contained in:
Thulinma 2014-01-27 18:02:58 +01:00
parent 92b7a7534d
commit d81bc24155
4 changed files with 95 additions and 17 deletions

View file

@ -68,6 +68,7 @@ namespace Socket {
Connection(int write, int read); ///< Simulate a socket using two file descriptors.
//generic methods
void close(); ///< Close connection.
void drop(); ///< Close connection without shutdown.
void setBlocking(bool blocking); ///< Set this socket to be blocking (true) or nonblocking (false).
bool isBlocking(); ///< Check if this socket is blocking (true) or nonblocking (false).
std::string getHost(); ///< Gets hostname for connection, if available.
@ -114,6 +115,7 @@ namespace Socket {
bool connected() const; ///< Returns the connected-state for this socket.
bool isBlocking(); ///< Check if this socket is blocking (true) or nonblocking (false).
void close(); ///< Close connection.
void drop(); ///< Close connection without shutdown.
int getSocket(); ///< Returns internal socket number.
};