Example #1
0
bool Client::_cmdExit( co::ICommand& command )
{
    _impl->running = false;
    // Close connection here, this is the last command we'll get on it
    command.getLocalNode()->disconnect( command.getRemoteNode( ));
    return true;
}
Example #2
0
bool Client::dispatchCommand( co::ICommand& command )
{
    LBVERB << "dispatch " << command << std::endl;

    if( command.getCommand() >= co::CMD_NODE_CUSTOM &&
        command.getCommand() < CMD_SERVER_CUSTOM )
    {
        co::NodePtr node = command.getRemoteNode();
        return node->co::Dispatcher::dispatchCommand( command );
    }

    return co::LocalNode::dispatchCommand( command );
}