Boost logo

Boost Users :

Subject: Re: [Boost-users] [asio] Can't read socket
From: Miklós Tóth (spiralfuzet_at_[hidden])
Date: 2014-01-08 10:50:44


It works! I had never figured it out. Thanks.

2014/1/8 Bjorn Reese <breese_at_[hidden]>

> On 01/08/2014 04:15 PM, Miklós Tóth wrote:
>
> Connector(boost::asio::io_service& io_service)
>> : _io_service(io_service), _socket(io_service) {
>>
> [...]
>
>> std::vector<char> _readbuffer;
>> };
>>
>
> Boost.Asio assumes that your buffer is allocated with the correct size.
> It does not use the fact that std::vector can be dynamically enlarged.
>
> Add _readbuffer(1024) to your initializer list.
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



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