nnl::Netman Class Reference

Network manager. More...

#include <netman.hh>

Inheritance diagram for nnl::Netman:

nnl::Singleton< T > List of all members.

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...

Detailed Description

Network manager.

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.


Member Function Documentation

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.

Parameters:
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.

Parameters:
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.

Parameters:
s socket
absTimeoutMs absolute timeout of operation in ms


The documentation for this class was generated from the following file:
Generated on Tue Jun 19 10:31:48 2012 for nnl by  doxygen 1.4.7