[Nfd-dev] semantics of Transport::pause

Junxiao Shi shijunxiao at email.arizona.edu
Mon Jan 19 20:14:08 PST 2015


Thanks. This information is added to ndn-cxx Application Developer Guide,
section 5.2.1.

On Mon, Jan 19, 2015 at 8:48 PM, Alex Afanasyev <afanasev at cs.ucla.edu>
wrote:

> On pause, all pending io_service tasks (e.g., for asynchronous waiting for
> incoming data) need to be cancelled (but socket should be kept in open
> state)
>
> On resume, new tasks need to get created to wait for new input.
>
>> Alex
>
> On Jan 19, 2015, at 7:45 PM, Junxiao Shi <shijunxiao at email.arizona.edu>
> wrote:
>
> Hi Alex
>
> If one is to implement a new Transport subclass, such as UdpTransport, or
> even SSH tunnel transport, what is expected to appear in pause() and
> resume()?
>
> Yours, Junxiao
>
> On Mon, Jan 19, 2015 at 8:20 PM, Alex Afanasyev <afanasev at cs.ucla.edu>
> wrote:
>
>> These are internal implementation details.  The reason to have those
>> calls is to enable use the following use case:
>>
>> - <send interest>
>> - call io::run()  (face::processEvents)
>>
>> as soon as data is retrieved, io::run unblocks.
>>
>> What pause() does is cancels any pending async_read operations if it is
>> known that no new data is expected to be received (no interest filter
>> defined and all interests are satisfied).  When there are no more jobs left
>> in io_service, io::run() unblocks.
>>
>> Explicitly stopping io_service is additional and unnecessary burden on
>> applications.
>>
>>>> Alex
>>
>> > On Jan 19, 2015, at 6:55 PM, Junxiao Shi <shijunxiao at email.arizona.edu>
>> wrote:
>> >
>> > Dear folks
>> >
>> > I'm trying to add UdpTransport into ndn-cxx to use in an experiment.
>> > I notice that Transport class has pause and resume methods, but there's
>> no documentation.
>> > What's the semantics of Transport::pause and Transport::resume methods?
>> >
>> > Yours, Junxiao
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20150119/329c3c73/attachment.html>


More information about the Nfd-dev mailing list