C
Chad Dalton
I am developing an asynchronous socket application and I
want the user to be able to start and stop the server.
Everything works fine when the server is started, but I
can't figure out how to close the listening socket. I've
tried listenersckt.shutdown and listenersckt.close, but I
receive an error that the socket is not connected. In
asynchronous sockets the listening socket will never by
connected. I have the StartListening Procedure running on
a background thread to prevent the user interface from
freezing up. I thought if I killed this thread that it
would destroy the listening socket, but it doesn't.
If I set the listenersckt = nothing, it still doesn't stop
the listening socket. Any ideas on how to put an
asynchronous socket in an unlistening state to prevent any
connections from being made to the server.
want the user to be able to start and stop the server.
Everything works fine when the server is started, but I
can't figure out how to close the listening socket. I've
tried listenersckt.shutdown and listenersckt.close, but I
receive an error that the socket is not connected. In
asynchronous sockets the listening socket will never by
connected. I have the StartListening Procedure running on
a background thread to prevent the user interface from
freezing up. I thought if I killed this thread that it
would destroy the listening socket, but it doesn't.
If I set the listenersckt = nothing, it still doesn't stop
the listening socket. Any ideas on how to put an
asynchronous socket in an unlistening state to prevent any
connections from being made to the server.