Hi Bjorn,
thanks for your response. While sending message from client I used \q\q as message separator and used async_read_until using the same as message separator. Now while client received the message as expected, the server crashed giving the error:

**Debug Assertion Failed! Expression: string iterator not deferenceable"
Thank you.

On Wed, Jul 29, 2015 at 2:57 PM, Bjorn Reese <breese@mail1.stofanet.dk> wrote:
On 07/29/2015 06:28 AM, Sarvagya Pant wrote:

I think in my case the buffer is not full, thus the handler function is
not getting called. How should I change my code so that server can read
the message sent by client, process it and send back correct response.?

It is easiest to introduce a message separator into your wire protocol.
For instance, you could terminate each message with a newline. Then you
can use async_read_until().

_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users



--
Sarvagya Pant
Kathmandu, Nepal
+9779803468257