示例#1
0
        /// <summary>
        /// Send an interest with the given name through the face with callbacks to
        /// handleCoveringKey, handleTimeout and handleNetworkNack.
        /// </summary>
        ///
        /// <param name="interest">The interest to send.</param>
        /// <param name="timeSlot_0"></param>
        /// <param name="onEncryptedKeys_1"></param>
        private void sendKeyInterest(Interest interest, double timeSlot_0,
                                     Producer.OnEncryptedKeys onEncryptedKeys_1, net.named_data.jndn.encrypt.EncryptError.OnError onError_2)
        {
            OnData onKey = new Producer.Anonymous_C2(this, timeSlot_0, onEncryptedKeys_1, onError_2);

            OnTimeout onTimeout = new Producer.Anonymous_C1(this, onEncryptedKeys_1, onError_2, timeSlot_0);

            OnNetworkNack onNetworkNack = new Producer.Anonymous_C0(this, onError_2, timeSlot_0, onEncryptedKeys_1);

            Interest request;

            if (keyRetrievalLink_.getDelegations().size() == 0)
            {
                // We can use the supplied interest without copying.
                request = interest;
            }
            else
            {
                // Copy the supplied interest and add the Link.
                request = new Interest(interest);
                // This will use a cached encoding if available.
                request.setLinkWireEncoding(keyRetrievalLink_.wireEncode());
            }

            face_.expressInterest(request, onKey, onTimeout, onNetworkNack);
        }
示例#2
0
        /// <summary>
        /// Send an interest with the given name through the face with callbacks to
        /// handleCoveringKey and handleTimeout.
        /// </summary>
        ///
        /// <param name="interest">The interest to send.</param>
        /// <param name="timeSlot_0"></param>
        /// <param name="onEncryptedKeys_1"></param>
        private void sendKeyInterest(Interest interest, double timeSlot_0,
                                     Producer.OnEncryptedKeys onEncryptedKeys_1, net.named_data.jndn.encrypt.EncryptError.OnError onError_2)
        {
            OnData onKey = new Producer.Anonymous_C1(this, onError_2, onEncryptedKeys_1, timeSlot_0);

            OnTimeout onTimeout = new Producer.Anonymous_C0(this, onError_2, timeSlot_0, onEncryptedKeys_1);

            face_.expressInterest(interest, onKey, onTimeout);
        }
示例#3
0
        /// <summary>
        /// Send an interest with the given name through the face with callbacks to
        /// handleCoveringKey, handleTimeout and handleNetworkNack.
        /// </summary>
        ///
        /// <param name="interest">The interest to send.</param>
        /// <param name="timeSlot_0"></param>
        /// <param name="onEncryptedKeys_1"></param>
        private void sendKeyInterest(Interest interest, double timeSlot_0,
				Producer.OnEncryptedKeys  onEncryptedKeys_1, net.named_data.jndn.encrypt.EncryptError.OnError  onError_2)
        {
            OnData onKey = new Producer.Anonymous_C2 (this, timeSlot_0, onEncryptedKeys_1, onError_2);

            OnTimeout onTimeout = new Producer.Anonymous_C1 (this, onError_2, timeSlot_0, onEncryptedKeys_1);

            OnNetworkNack onNetworkNack = new Producer.Anonymous_C0 (this, timeSlot_0, onEncryptedKeys_1);

            face_.expressInterest(interest, onKey, onTimeout, onNetworkNack);
        }