|
-
August 1st, 2012, 02:28 AM
#1
Problems with BeginReceive Callback
Hi everybody
I am dealing with a strange problem when closing a socket connection. I am using an asynchronous receive and I specified, as is MSDN's suggestion, a user-defined object as the last parameter in my BeginReceive(). I expect, as MSDN says, this same object to be passed in the State field of the IAsynchResult parameter of the Callback function I specified in my BeginReceive () call. But , as I close the connection, and the tcp layer as usual sends me a zero-length packet, the Callback function is called but the State field is the Socket native object which received the close and not the user-defined object I specified in the BeginReceive.
This seems to be in contrast with MSDN specifications. What am I doing wrong ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|