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 ?