I
il RicercatoreSbadato
title: asyncronous Socket and EndAccept()
question: hi to all, I am working with a server that uses the sockets in a
asyncronous way. When I want to STOP the server I do the following:
- serverMainSocket.EndAccept();
- serverMainSocket.Shutdown(SocketShutdown.Both);
- serverMainSocket.Close();
My problem is on the first instruction. I don't know what can I put as
argument in the EndAccept().
I've tried with
IAsyncResult asyn;
serverMainSocket.EndAccept(asyn);
but this is seen like an error.
Any ideas?
question: hi to all, I am working with a server that uses the sockets in a
asyncronous way. When I want to STOP the server I do the following:
- serverMainSocket.EndAccept();
- serverMainSocket.Shutdown(SocketShutdown.Both);
- serverMainSocket.Close();
My problem is on the first instruction. I don't know what can I put as
argument in the EndAccept().
I've tried with
IAsyncResult asyn;
serverMainSocket.EndAccept(asyn);
but this is seen like an error.
Any ideas?