MongoDB  2.7.0
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
mongo::Listener Class Reference
Inheritance diagram for mongo::Listener:
mongo::MiniWebServer

Public Member Functions

 Listener (const std::string &name, const std::string &ip, int port, bool logConnect=true)
 
void initAndListen ()
 
virtual void accepted (boost::shared_ptr< Socket > psocket, long long connectionId)
 
virtual void acceptedMP (MessagingPort *mp)
 
long long getMyElapsedTimeMillis () const
 
void setupSockets ()
 Allocate sockets for the listener and set _setupSocketsSuccessful to true iff the process was successful.
 
void setAsTimeTracker ()
 

Static Public Member Functions

static const ListenergetTimeTracker ()
 
static long long getElapsedTimeMillis ()
 
static void checkTicketNumbers ()
 makes sure user input is sane
 

Public Attributes

const int _port
 

Static Public Attributes

static AtomicInt64 globalConnectionNumber
 the "next" connection number. More...
 
static TicketHolder globalTicketHolder
 keeps track of how many allowed connections there are and how many are being used
 

Member Function Documentation

long long mongo::Listener::getMyElapsedTimeMillis ( ) const
inline
Returns
a rough estimate of elapsed time since the server started todo: 1) consider adding some sort of relaxedLoad semantic to the reading here of _elapsedTime 2) curTimeMillis() implementations have gotten faster. consider eliminating this code? would have to measure it first. if eliminated be careful if syscall used isn't skewable. Note also if #2 is done, listen() doesn't then have to keep waking up and maybe that helps on a developer's laptop battery usage...

Member Data Documentation

AtomicInt64 mongo::Listener::globalConnectionNumber
static

the "next" connection number.

every connection to this process has a unique number


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