Boost logo

Boost Users :

Subject: Re: [Boost-users] code review please? [boost::asio]
From: Igor R (boost.lists_at_[hidden])
Date: 2012-11-18 14:13:56


> I was curious if some boost::asio guru would mind checking this out. I just
> posted my code in, I'd like to know if there's anything that could be done
> better.

I'm not a guru, but pay attention to 2 points:
1) If _buffers container has several elements, HandleWrite() won't
call Write() anymore. In other words, _writing state flag handling is
incorrect: the flag should be reset unconditionally in HandleWrite().
2) The access to _buffers container is not synchronized, so you may
call Client::Write() only from the thread that executes
io_service::run().


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