Hi,

I am programming a server-client socket software. On client side, when I click on the close window at the right upper side [X] Formclosing is initiated. I want to send to the server some information about disconnecting socket. My problem is that the client is in receiving state and I need to stop receiving state by calling socket.endreceive. I can't do that in Formclosing cause It need IASyncResult object that is not accessible.

Is there a way to achieve that?

many thanks.

Patrice