Boost logo

Boost Users :

Subject: Re: [Boost-users] Fwd: Sockets & acceptors
From: Igor R (boost.lists_at_[hidden])
Date: 2009-09-22 16:16:18


>         boost::asio::read(serverSocket, boost::asio::buffer((char *) message, messageSize));
<...>
> As you can see, the server does nothing with the client connection.
> However, the client reads the 12 bytes as requested in the last line with
> boost::asio::read.  The information received here is junk (to my program)
> and causes it to crash.

Are you sure read() returns successfully and doesn't raise exception?
Try to initialize the memory buffer (fill with zeros or something),
and see if it really changes.


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