From: Richard on
Hi All,

I'm having problems using SocketAsyncEventArgs, when the socket/connection
generates an ConnectionAborted error in the receiveasync callback. After
thet i can't reuse the same SocketAasyncEventArgs, it gives me an error
saying it is already doing an async operation! When debugging the socket
(via network tracing) it seems that all async operations have been
completed!

Does anybody know why this is or even why i'm getting an ConnectionAborted
error?

Thanks in advance.
Richard.

ps. Happy new year :).

From: Peter Duniho on
On Wed, 31 Dec 2008 08:40:39 -0700, Richard <rh(a)xs4all.nl> wrote:

> Hi All,
>
> I'm having problems using SocketAsyncEventArgs, when the
> socket/connection generates an ConnectionAborted error in the
> receiveasync callback. After thet i can't reuse the same
> SocketAasyncEventArgs, it gives me an error saying it is already doing
> an async operation! When debugging the socket (via network tracing) it
> seems that all async operations have been completed!
>
> Does anybody know why this is or even why i'm getting an
> ConnectionAborted error?

You should post a concise-but-complete code sample that reliably
demonstrates the problem. It's possible you've found a bug in the .NET
implementation of the "...Async" pattern for the Socket class, but without
seeing your code, there's no way to say for sure. You might just be doing
something wrong.

Pete