SocketClosed

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SocketClosed

Steve Alan Waring
Hi,

I am working on a client socket application that uses multiple sockets in
forked processes.

Intermittently I am seeing the SocketClosed exception signalled from
SocketAbstract>>waitOn: when there are still bytes that can be received from
the socket.

Quoting:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/wsa
piref_6jn6.asp

"FD_CLOSE should only be posted after all data is read from a socket, but an
application should check for remaining data upon receipt of FD_CLOSE to
avoid any possibility of losing data"

I think I am seeing the "shoudn't" case :)

Should Socket>>onAsyncClose be implemented to send #onAsyncRead? If a
process is waiting on the readSemaphore it will cause the SocketClosed
exception to be signalled from Socket>>basicReceiveByteArray: instead.

I have been testing this without seeing any side effects, but I do not have
any code that relies on the #remoteSocketClosed event.

Thanks,
Steve Waring


Reply | Threaded
Open this post in threaded view
|

Re: SocketClosed

Blair McGlashan
"Steve Waring" <[hidden email]> wrote in message
news:[hidden email]...
> Hi,
>
> I am working on a client socket application that uses multiple sockets in
> forked processes.
>
> Intermittently I am seeing the SocketClosed exception signalled from
> SocketAbstract>>waitOn: when there are still bytes that can be received
from
> the socket.

#726 (and thanks for the patch you sent Steve).

Regards

Blair