[Mono-dev] Socket.BeginReceive never throw Exception

Alan McGovern alan.mcgovern at gmail.com
Fri Apr 9 11:31:35 EDT 2010


Is there a testcase for this? This works fine for me, I'm inclined to
believe there's a bug in the testcase.

Alan.

On Fri, Apr 9, 2010 at 4:21 PM, Stefan [At] <swieser1983 at gmail.com> wrote:
>
>> socket.BeginReceive(receive_buffer, 0, FlockNode.buffer_size, 0,
>> new AsyncCallback(ReceiveDone), socket);
>
>> If the Socket gets disconnected by the remote host,
>> ReceiveDone is called, and EndReceive will throw a SocketException;
>> thus you know that your socket is now disconnected without having
>> to poll it. With Mono, no exception is thrown.
>
> Just to be a bit more clear about this, not only no exception is thrown,
> ReceiveDone isn't called either.
> --
> View this message in context: http://n4.nabble.com/Socket-BeginReceive-never-throw-Exception-tp1679973p1819481.html
> Sent from the Mono - Dev mailing list archive at Nabble.com.
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>


More information about the Mono-devel-list mailing list