Boost logo

Boost Users :

Subject: [Boost-users] [Asio] null_buffers problem
From: lin li (sdeber_at_[hidden])
Date: 2014-11-19 20:16:20


Hi, guys. I have some problem with null_buffers in Asio. According to the document, 'A null_buffers operation doesn't return until the I/O object is "ready" to perform the operation'. However, when I tried to use it in a asynchronous read, it keeps returning after all data has been received and the other end has closed the socket! So here is my questions:
 1. what is "ready" exactly?
 2. If we use null_buffers with async_read_some, will it detect some errors like disconnection and pass the error code to the completion handler?
                                               



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