Re: [asio-users] scatter/gather (async_receive)
Brought to you by:
chris_kohlhoff
From: Craig P. <cperras@u.washington.edu> - 2008-12-11 21:09:05
|
i'll take a look. thanks, daniel. On Wed, 10 Dec 2008, daniel he wrote: > Craig, > > scatter/gather may not be helpful for your case. I wrote one small > project using asio/UDP for video streaming. > You can find the source code from > http://ppstreaming.svn.sourceforge.net/viewvc/ppstreaming/trunk/ppstreaming/ > > Just for your reference, I have not updated it for a long time. > > Thank, > > Daniel > > > Craig Perras wrote: >> thanks, Piotr. >> >> i'm probably missing something fundamental. i tried using scatter/gather >> io for udp datagrams (video streaming) to increase performance (say to >> read multiple datagrams with a single call). but maybe that's not how it's >> supposed to work? if the datagrams are "packed" into the buffer, then >> you'll lose the dgram msg boundaries (if they happen to be important). >> otoh, in practice (on windows and linux), only one dgram is read per call >> even if, say, 16 buffers are available. >> >> any ideas on when scatter/gather io for udp might be useful? i can't think >> of any (or maybe i'm somehow not coding this right; i'm sending udp >> packets at ~2e9 bits/second, so they should be buffered). >> >> thanks, >> --craig >> >> On Wed, 10 Dec 2008, Piotr Findeisen wrote: >> >> >>> I'd expect that during scatter/gatter read the buffers are filled from first >>> to last. >>> As you know the buffers length before the call and know how many bytes are >>> read in total, you can figure out, which was the last buffer filled and up >>> to which byte. >>> >>> hth, >>> Piotr >>> >>> On Tue, Dec 9, 2008 at 23:27, Craig Perras <cperras@u.washington.edu> wrote: >>> >>> >>>> hi - >>>> >>>> i'm trying to use scatter/gather io with udp (async_receive). i can't >>>> figure out how to get the returned individual buffer lengths, only the >>>> total bytes read. is it possible to get this information? i'm looking at >>>> the windows implementation: WSARecv bufs are in/out params, and it looks >>>> like the returned buffer lengths are discarded. >>>> >>>> any help is appreciated. >>>> >>>> thanks, >>>> --craig >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. >>>> The future of the web can't happen without you. Join us at MIX09 to help >>>> pave the way to the Next Web now. Learn more and register at >>>> >>>> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ >>>> _______________________________________________ >>>> asio-users mailing list >>>> asi...@li... >>>> https://lists.sourceforge.net/lists/listinfo/asio-users >>>> >>>> >> >> ------------------------------------------------------------------------------ >> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. >> The future of the web can't happen without you. Join us at MIX09 to help >> pave the way to the Next Web now. Learn more and register at >> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ >> _______________________________________________ >> asio-users mailing list >> asi...@li... >> https://lists.sourceforge.net/lists/listinfo/asio-users >> >> > > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. > The future of the web can't happen without you. Join us at MIX09 to help > pave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > _______________________________________________ > asio-users mailing list > asi...@li... > https://lists.sourceforge.net/lists/listinfo/asio-users > |