Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::asio memory buffers and persistentconnections.
From: Alejandro Martinez (elpeque2_at_[hidden])
Date: 2009-03-26 08:34:46


how?

"Matthieu Brucher" <matthieu.brucher_at_[hidden]> escribió en el mensaje
news:e76aa17f0903251501o1a59c517la77b4a4338d0c684_at_mail.gmail.com...
> Perhaps you could use streambuffers ?
>
> Matthieu
>
> 2009/3/25 Igor R <boost.lists_at_[hidden]>:
>>> How could i make it so i can set the buffer to use at the exact moment
>>> in
>>> which data for a new request in an already open connection begins to
>>> arrive?
>>
>> You can make initial calls to async_read (or whatever read function
>> you use) with buffer of 1 byte. When the handler is called, i.e. some
>> data is available, you can perform "speculative" read (even
>> synchronous) of all the data available - into any buffer you wish.
>> _______________________________________________
>> Boost-users mailing list
>> Boost-users_at_[hidden]
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>>
>
>
>
> --
> Information System Engineer, Ph.D.
> Website: http://matthieu-brucher.developpez.com/
> Blogs: http://matt.eifelle.com and http://blog.developpez.com/?blog=92
> LinkedIn: http://www.linkedin.com/in/matthieubrucher


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net