Example #1
0
    /// <summary>Create a XmppEL.</summary>
    public XmppEdgeListener(XmppService xmpp)
    {
      _it = new IdentifierTable();
      _running = 0;
      _started = 0;
      _ready = 0;

      _xmpp = xmpp;
      xmpp.OnStreamInit += XmppRelayFactory.HandleStreamInit;
      // After we've authenticated we setup the rest of our paths
      xmpp.OnAuthenticate += HandleAuthenticate;
      if(xmpp.IsAuthenticated) {
        HandleAuthenticate(null);
      }
    }
Example #2
0
    /// <summary>Create a SubringEdgeListener.</summary>
    /// <param name="shared_node">The overlay used for the transport.</param>
    /// <param name="private_node">The overlay needing edges.</param>
    public SubringEdgeListener(Node shared_node, Node private_node)
    {
      _shared_node = shared_node;
      _private_node = private_node;
      _it = new IdentifierTable();

      _local_ta = new SubringTransportAddress(shared_node.Address as AHAddress,
          shared_node.Realm);

      _ptype = new PType("ns:" + shared_node.Realm);
      shared_node.DemuxHandler.GetTypeSource(_ptype).Subscribe(this, null);

      _running = 0;
      _started = 0;
    }