Boost logo

Boost Users :

Subject: Re: [Boost-users] [Asio] [Boost.ASIO] async_read cannot read full data from client
From: Sarvagya Pant (sarvagya.pant_at_[hidden])
Date: 2015-07-30 11:25:42


Thanks Bjorn, I have solved the problem by making a shared pointer inside
tcp_connection class **boost::shared_ptr<std::string> messageSend;** .
While the server now works fine, but for the client created by me, the
client received gets correct response the first time but it will not get
response afterwards and gives error **system:10053 receive: An established
connection was aborted by the software in your host machine**
The client will attempt to connect to socket and kept on loop forever to
communicate with client. Doesn't the boost keep reference of current alive
connection? Please correct me.
Thanks.

On Wed, Jul 29, 2015 at 5:59 PM, Bjorn Reese <breese_at_[hidden]>
wrote:

> On 07/29/2015 11:42 AM, Sarvagya Pant wrote:
>
> separator. Now while client received the message as expected, the server
>> crashed giving the error:
>>
>> **Debug Assertion Failed! Expression: string iterator not deferenceable"
>>
>
> This is likely due to your messageTemp variables. When you pass a buffer
> to async_write, then you must make sure that it exits until the write
> operation is done.
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>

-- 
*Sarvagya Pant*
*Kathmandu, Nepal*
*+9779803468257*




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