Beispiel #1
0
    void listen(int port) {
        //testTheDb();
        log() << "waiting for connections on port " << port << endl;
        OurListener l(cmdLine.bind_ip, port);
        l.setAsTimeTracker();
        startReplication();
        if ( !noHttpInterface )
            boost::thread thr(webServerThread);

#if(TESTEXHAUST)
        boost::thread thr(testExhaust);
#endif
        l.initAndListen();
    }
Beispiel #2
0
Datei: db.cpp Projekt: zhuk/mongo
 /* versions
    114 bad memory bug fixed
    115 replay, opLogging
 */
 void listen(int port) {
     log() << mongodVersion() << endl;
     printGitVersion();
     printSysInfo();
     pdfileInit();
     //testTheDb();
     log() << "waiting for connections on port " << port << endl;
     OurListener l(bind_ip, port);
     startReplication();
     if ( !noHttpInterface )
         boost::thread thr(webServerThread);
     if ( l.init() ) {
         registerListenerSocket( l.socket() );
         l.listen();
     }
 }
Beispiel #3
0
    void listen(int port) {
        //testTheDb();
        MessageServer::Options options;
        options.port = port;
        options.ipList = cmdLine.bind_ip;

        MessageServer * server = createServer( options , new MyMessageHandler() );
        server->setAsTimeTracker();

        startReplication();
        if ( !noHttpInterface )
            boost::thread web( boost::bind(&webServerThread, new RestAdminAccess() /* takes ownership */));

#if(TESTEXHAUST)
        boost::thread thr(testExhaust);
#endif
        server->run();
    }
Beispiel #4
0
    void listen(int port) {
        //testTheDb();
        MessageServer::Options options;
        options.port = port;
        options.ipList = serverGlobalParams.bind_ip;

        MessageServer * server = createServer( options , new MyMessageHandler() );
        server->setAsTimeTracker();
        // we must setupSockets prior to logStartup() to avoid getting too high
        // a file descriptor for our calls to select()
        server->setupSockets();

        logStartup();
        startReplication();
        if (serverGlobalParams.isHttpInterfaceEnabled)
            boost::thread web( boost::bind(&webServerThread, new RestAdminAccess() /* takes ownership */));

#if(TESTEXHAUST)
        boost::thread thr(testExhaust);
#endif
        server->run();
    }