<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">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)</div><div class=""><br class=""></div><div class="">On resume, new tasks need to get created to wait for new input.</div><div class=""><br class=""></div><div class="">—</div><div class="">Alex</div><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 19, 2015, at 7:45 PM, Junxiao Shi <<a href="mailto:shijunxiao@email.arizona.edu" class="">shijunxiao@email.arizona.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi Alex<div class=""><br class=""></div><div class="">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()?</div><div class=""><br class=""></div><div class="">Yours, Junxiao</div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Jan 19, 2015 at 8:20 PM, Alex Afanasyev <span dir="ltr" class=""><<a href="mailto:afanasev@cs.ucla.edu" target="_blank" class="">afanasev@cs.ucla.edu</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">These are internal implementation details.  The reason to have those calls is to enable use the following use case:<br class="">
<br class="">
- <send interest><br class="">
- call io::run()  (face::processEvents)<br class="">
<br class="">
as soon as data is retrieved, io::run unblocks.<br class="">
<br class="">
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.<br class="">
<br class="">
Explicitly stopping io_service is additional and unnecessary burden on applications.<br class="">
<br class="">
—<br class="">
<span class="HOEnZb"><font color="#888888" class="">Alex<br class="">
</font></span><div class="HOEnZb"><div class="h5"><br class="">
> On Jan 19, 2015, at 6:55 PM, Junxiao Shi <<a href="mailto:shijunxiao@email.arizona.edu" class="">shijunxiao@email.arizona.edu</a>> wrote:<br class="">
><br class="">
> Dear folks<br class="">
><br class="">
> I'm trying to add UdpTransport into ndn-cxx to use in an experiment.<br class="">
> I notice that Transport class has pause and resume methods, but there's no documentation.<br class="">
> What's the semantics of Transport::pause and Transport::resume methods?<br class="">
><br class="">
> Yours, Junxiao<br class="">
<br class="">
</div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></body></html>