M
Markus Ewald
Hi!
I'm designing a system for communicating with an USB device. Now I'm a
bit stuck with Microsoft's asynchronous operation concept in .NET. You
know, the stuff with a normal method (eg. Receive()) and two
asynchronous methods (eg. BeginReceive() and EndReceive()).
Now I'm wondering about the exact semantics of this concept. Maybe
someone with more experience can help me answer these questions:
- What happens if an error occurs during the asynchronous transmission?
Is it reported by EndReceive()?
- Do IAsyncResult.AsyncWaitHandle and IsCompleted both need to be set
regardless of the outcome of the operation?
- What about multiple simultaneous calls to BeginReceive()? Is this
allowed? Or can I decided whether to support it on a case-per-case basis?
Thanks,
-Markus-
I'm designing a system for communicating with an USB device. Now I'm a
bit stuck with Microsoft's asynchronous operation concept in .NET. You
know, the stuff with a normal method (eg. Receive()) and two
asynchronous methods (eg. BeginReceive() and EndReceive()).
Now I'm wondering about the exact semantics of this concept. Maybe
someone with more experience can help me answer these questions:
- What happens if an error occurs during the asynchronous transmission?
Is it reported by EndReceive()?
- Do IAsyncResult.AsyncWaitHandle and IsCompleted both need to be set
regardless of the outcome of the operation?
- What about multiple simultaneous calls to BeginReceive()? Is this
allowed? Or can I decided whether to support it on a case-per-case basis?
Thanks,
-Markus-