GetTypeSource() public method

All packets that come to this are demultiplexed according to t. To subscribe or unsubscribe, get the ISource for the type you want and subscribe to it,
public GetTypeSource ( Object t ) : ISource
t Object The key for the MultiSource.
return ISource
Example #1
0
    public ChotaConnectionOverlord(Node n)
    {
      _node = n;
      _cmp = new NodeRankComparer();
      _sync = new object();
      _rand = new Random();
      _node_rank_list = new ArrayList();
      _dest_to_node_rank = new Hashtable();

      lock( _sync ) {
      	// we assess trimming/growing situation on every heart beat
        _node.HeartBeatEvent += this.CheckState;
	      //subscribe the ip_handler to IP packets
        _node.GetTypeSource(PType.Protocol.IP).Subscribe(this, null);
        // this is for security
        _node.GetTypeSource(new PType(29)).Subscribe(this, null);
      }
    }