Hi Yuri,
thank you, âwrite callbackâ is the case!
Regards, Evgeni
Von: Yuri Timenkov [mailto:***@timenkov.ru]
Gesendet: Dienstag, 4. September 2012 10:23
An: asio-***@lists.sourceforge.net
Betreff: Re: [asio-users] wrong data sequence using boost::asio::async_read()
You can check how data travel over network with WireShark. Just right-click on packet and choose "Follow TCP stream". It shall open dialog with reassembled session.
However by "concurrent" people usually mean that async_read called 2 times before handler called. E.g. from write callback.
On Tue, Sep 4, 2012 at 11:35 AM, <***@durr.com<mailto:***@durr.com>> wrote:
Hi Marat,
thank your for the answer.
Currenty doesn't see the how async_read(_some) could run simultaneous in my case.
Maybe by mistake or missunderstanding.
Have
boost::asio::async_read (
socket_, ...
&handle_read)
....
handle_read()
{
......
boost::asio::async_read (
socket_, ...
&handle_read)
}
Next async_read always starts in handle_read() after the previous finished.
Hope so :-)
Are there more details to care about?
Could the counterpart (actually not PC but Simens S7 PLC) have specific delivery policy or it's impossible with TCP ? (currently doesn't there answer)
Many thanks,
Evgeni
-----UrsprÃŒngliche Nachricht-----
Von: Marat Abrarov [mailto:***@mail.ru<mailto:***@mail.ru>]
Gesendet: Montag, 3. September 2012 18:52
An: asio-***@lists.sourceforge.net<mailto:asio-***@lists.sourceforge.net>
Betreff: Re: [asio-users] wrong data sequence using boost::asio::async_read()
Hi, Evgeni.
Post by e***@durr.comDoes somebody have an idea?
The most often (programmers') mistake (I'd read at this mailing list) related to such behavior is more than one
async_read(_some) simultaneous operations on the same socket.
http://www.boost.org/doc/libs/1_51_0/doc/html/boost_asio/reference/async_read/overload1.html:
~~~~~~~~~
This operation is implemented in terms of zero or more calls to the stream's async_read_some function, and is known as a composed operation. The program must ensure that the stream performs no other read operations (such as async_read, the stream's async_read_some function, or any other composed operations that perform reads) until this operation completes.
~~~~~~~~~
Regards,
Marat Abrarov.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
asio-users mailing list
asio-***@lists.sourceforge.net<mailto:asio-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List your project at
http://think-async.com/Asio/WhoIsUsingAsio
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
asio-users mailing list
asio-***@lists.sourceforge.net<mailto:asio-***@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/asio-users
_______________________________________________
Using Asio? List your project at
http://think-async.com/Asio/WhoIsUsingAsio