#include <netman.hh>
Inheritance diagram for nnl::Netman:

Public Member Functions | |
| Netman () | |
| Constructor. | |
| ~Netman () | |
| Destructor. | |
| void | Run () |
| Execute requested network operations. | |
| void | WantOut (Socket *s, AbsMsecTime absTimeoutMs) |
| Want out network operation. | |
| void | WantIn (Socket *s, AbsMsecTime absTimeoutMs) |
| Want in network operation. | |
| void | DidSend (Socket *s) |
| Register notification request after sending data. | |
| void | DidRecv (Socket *s) |
| Register notification request after receiving data. | |
| void | Sleep (Socket *s, AbsMsecTime absTimeoutMs) |
| Request sleep. | |
| void | Sleep0 (Socket *s) |
| Request immediate wakeup. | |
Private Attributes | |
| Impl *const | mpImpl |
| implementation | |
Classes | |
| struct | Impl |
| Netman private implementation. More... | |
Implements network manager. The manager is responsible to execute the network operations and notify the callers with the result.
Uses poll(2) for non-blocking I/O.
| void nnl::Netman::DidRecv | ( | Socket * | s | ) |
Register notification request after receiving data.
This does not request poll() on the socket, just a notification. Receiving data was already done.
| void nnl::Netman::DidSend | ( | Socket * | s | ) |
Register notification request after sending data.
This does not request poll() on the socket, just a notification. Sending data was already done.
| void nnl::Netman::Sleep | ( | Socket * | s, | |
| AbsMsecTime | absTimeoutMs | |||
| ) |
Request sleep.
Don't request any operation, just blocking for certain abount of time.
| s | socket | |
| absTimeoutMs | time when to finish the sleep |
| void nnl::Netman::Sleep0 | ( | Socket * | s | ) |
Request immediate wakeup.
Optimized version of Sleep() for timeout 0.
| void nnl::Netman::WantIn | ( | Socket * | s, | |
| AbsMsecTime | absTimeoutMs | |||
| ) |
Want in network operation.
Called by Socket if POLLIN is needed.
| s | socket | |
| absTimeoutMs | absolute timeout of operation in ms |
| void nnl::Netman::WantOut | ( | Socket * | s, | |
| AbsMsecTime | absTimeoutMs | |||
| ) |
Want out network operation.
Called by Socket if POLLOUT is needed.
| s | socket | |
| absTimeoutMs | absolute timeout of operation in ms |
1.4.7