Boost logo

Boost Users :

Subject: Re: [Boost-users] socket.is_open returning false when it is in use
From: Gonzalo Garramuño (ggarra13_at_[hidden])
Date: 2012-12-08 16:38:08


El 08/12/2012 04:55 a.m., Igor R escribió:
>> I have a problem with my program and I traced it to socket.is_open which
>> returns as closed even while the connection is active in my server program.
>> The client, however, can still communicate with that supposedly closed
>> socket. The program is similar to the timeouts example. I can post all the
>> source code if needed.
> is_open() merely checks whether the socket has a valid handle
> (descriptor), so it can be "false positive", but can't be "false
> negative". Show some code - perhaps you've got a race-condition?
Here is the code (won't compile, thou). It is just for reviewing purposes.








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