예제 #1
0
파일: server.cpp 프로젝트: yarda/Equalizer
//---------------------------------------------------------------------------
// command handlers
//---------------------------------------------------------------------------
bool Server::_cmdChooseConfigReply( co::Command& command )
{
    const ServerChooseConfigReplyPacket* packet = 
        command.get<ServerChooseConfigReplyPacket>();
    EQVERB << "Handle choose config reply " << packet << std::endl;

    co::LocalNodePtr  localNode = command.getLocalNode();
    if( packet->configID == co::base::UUID::ZERO )
    {
        localNode->serveRequest( packet->requestID, (void*)0 );
        return true;
    }

    const Configs& configs = getConfigs();
   
    for( Configs::const_iterator i = configs.begin(); i != configs.end(); ++i )
    {
        Config* config = *i;
        if( config->getID() ==  packet->configID )
        {
            config->setupServerConnections( packet->connectionData );
            localNode->serveRequest( packet->requestID, config );
            return true;
        }
    }

    EQUNIMPLEMENTED
    return true;
}
예제 #2
0
파일: server.cpp 프로젝트: yarda/Equalizer
bool Server::_cmdReleaseConfigReply( co::Command& command )
{
    const ServerReleaseConfigReplyPacket* packet = 
        command.get<ServerReleaseConfigReplyPacket>();

    co::LocalNodePtr localNode = command.getLocalNode();
    localNode->serveRequest( packet->requestID );
    return true;
}
예제 #3
0
파일: server.cpp 프로젝트: yarda/Equalizer
bool Server::_cmdShutdownReply( co::Command& command )
{
    const ServerShutdownReplyPacket* packet = 
        command.get<ServerShutdownReplyPacket>();
    EQINFO << "Handle shutdown reply " << packet << std::endl;

    co::LocalNodePtr  localNode = command.getLocalNode();
    localNode->serveRequest( packet->requestID, packet->result );
    return true;
}