|
Boost Users : |
Subject: [Boost-users] boost asio: repeated reading to delimiter
From: Cattus Cerebrum (cattuscerebrum_at_[hidden])
Date: 2010-10-17 19:05:44
A very newbie question from a beginner user of boost::asio. I have
used BSD socket interface a lot in the past, and would like to start
using boost::asio for my networking code.
I have a server that is providing data through a network socket. The
data is a continuous stream of bytes, with different data elements
separated from each other by a zero byte. Would reading into a
streambuf with the help of async_read_until() be a good way of
handling this situation? The code I am thinking of replacing uses
select() to wait for arriving data, and then reads it into a circular
buffer.
Thanks.
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