Boost logo

Boost Users :

Subject: [Boost-users] [Asio] read_some throws exception with IOCP disabled
From: Collin Dauphinee (dauphinee_at_[hidden])
Date: 2010-01-22 13:30:57


I have a piece of code that works completely fine with IOCP enabled, but
when I disable it via the BOOST_ASIO_DISABLE_IOCP define, any attempts to
call socket.read_some will throw an exception. This exception states that
"An operation was attempted on something that is not a socket." However, I
am able to write to this socket without problems; no exception is thrown and
the data is received by the server.

 

I've also tried reading and writing with the native Windows socket. Any
calls to send() will succeed, but calls to recv() will return the error
given above. This includes a write, read, write sequence; the first write
will succeed, the read will fail, the second write will succeed even though
the read told me that the handle isn't a socket.

 

Only synchronous operations are being done on this socket. It's connected
normally, no strange options are set on it, etc; the code is more or less
the same as that found in the synchronous TCP client examples.

 

Any solutions or workarounds to this problem would be greatly appreciated. I
need to have IOCP disabled, so re-enabling it isn't a solution.



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