Project

General

Profile

Actions

Bug #3130

closed

RegisterPrefix doesn't provide a callback

Added by susmit shannigrahi about 9 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
08/24/2015
Due date:
% Done:

0%

Estimated time:

Description

When face.registerPrefix() is called immediately followed by face.ExpressInterest(), Interests time out.
This happens since registerPrefix takes some time to complete and when Data comes back, it doesn't find any faces with the handle.

For the following code first few Data packets will timeout.

    face.registerPrefix(prefix, self.onInterest, self.onRegisterFailed)
    print("Registering prefix", prefix.toUri())

    #express Interest
    interest = Interest(Name(publish))
    interest.setInterestLifetimeMilliseconds(4000)
    interest.setMustBeFresh(True)
    self.face.expressInterest(interest, self._onData, self._onTimeout)
    print("Expressed Interest %s" %(interest.getName()))

Related issues 1 (0 open1 closed)

Is duplicate of NDN-CCL - Feature #3005: Add callback for successful prefix registrationClosed07/02/2015

Actions
Actions #1

Updated by Anonymous about 9 years ago

Hello Susmit. In jNDN (the Java library), we added an OnRegisterSuccess callback to registerPrefix:
https://github.com/named-data/jndn/blob/5f5583a95afe48644e4dcd736bee6bf34a107b4d/src/net/named_data/jndn/Face.java#L504

We have plans to add the same for the other libraries including PyNDN. Would that meet your needs? If so, I can raise the priority of implementing this in PyNDN.

Actions #2

Updated by susmit shannigrahi about 9 years ago

Yes, this will be sufficient. Please raise the priority.

Actions #3

Updated by Anonymous about 9 years ago

  • Is duplicate of Feature #3005: Add callback for successful prefix registration added
Actions #4

Updated by Anonymous about 9 years ago

  • Status changed from New to Closed

I re-opened issue #3005 for implementing OnRegisterSuccess in all the libraries, including PyNDN, so please follow it. I'm closing this issue as a duplicate.

Actions #5

Updated by Anonymous about 9 years ago

Hi Susmit. I implemented the optional onRegisterSuccess callback in registerPrefix.
https://github.com/named-data/PyNDN2/blob/874fbfd29358f497b9e7d00b25417af11d62d8ba/python/pyndn/face.py#L256

Actions #6

Updated by susmit shannigrahi about 9 years ago

Thanks Jeff. Do you think it's possible to have it in the ndn-js library too? That would be helpful.

Actions #7

Updated by Anonymous about 9 years ago

Yes, I plan to add onRegisterSuccess in NDN-JS. First I need to remove support for NDNx in registerPrefix, which I'll do before NDNcomm. Then I'll add onRegisterSuccess after NDNcomm. Is that OK?

Actions #8

Updated by susmit shannigrahi about 9 years ago

Yes, absolutely.

Actions #9

Updated by Anonymous about 9 years ago

Great. I will update issue #3005 when it's done.

Actions

Also available in: Atom PDF