Exemple #1
0
void LocalNode::addListener( ConnectionPtr connection )
{
    EQASSERT( isListening( ));
    EQASSERT( connection->isListening( ));

    connection->ref( CO_REFERENCED_PARAM );
    NodeAddListenerPacket packet( connection );
    Nodes nodes;
    getNodes( nodes );

    for( Nodes::iterator i = nodes.begin(); i != nodes.end(); ++i )
    {
        (*i)->send( packet, connection->getDescription()->toString( ));
    }
}
Exemple #2
0
uint32_t LocalNode::removeListenerNB( ConnectionPtr connection )
{
    EQASSERT( isListening( ));
    EQASSERT( connection->isListening( ));

    connection->ref( CO_REFERENCED_PARAM );
    NodeRemoveListenerPacket packet( connection, registerRequest( ));
    Nodes nodes;
    getNodes( nodes );

    for( Nodes::iterator i = nodes.begin(); i != nodes.end(); ++i )
    {
        (*i)->send( packet, connection->getDescription()->toString( ));
    }
    return packet.requestID;
}