Exemplo n.º 1
0
    void expressInitialInterest()
    {
        Debug.Log("expressInitialInterest: start");
        Interest initialInterest = new Interest(this.prefix);

        initialInterest.setMustBeFresh(true);
        initialInterest.setInterestLifetimeMilliseconds(config.defaultInitialLifetime);
        // for initial interest, the rightMostChild is preferred
        initialInterest.setChildSelector(1);

        InitialDataHandler handler = new InitialDataHandler(this);

        Debug.Log("expressInitialInterest: " + initialInterest.toUri());
        this.face.expressInterest(initialInterest, handler, handler);
    }
Exemplo n.º 2
0
    // Use this for initialization
    public void start()
    {
        face_ = new Face(new TcpTransport(), new TcpTransport.ConnectionInfo(hostName));

        bootstrap_       = new Bootstrap(face_);
        keyChain_        = bootstrap_.setupDefaultIdentityAndRoot(new Name(instanceName), new Name());
        certificateName_ = bootstrap_.getDefaultCertificateName();

        // initialize the gyro instance
        startOptConsumer();
        initialHandler_ = new InitialDataHandler(this);

        while (true)
        {
            face_.processEvents();
            System.Threading.Thread.Sleep(5);
        }
    }