Re: How to close a blocked socket
- From: "Diego F." <diego_frNO@xxxxxxx>
- Date: Thu, 28 Jun 2007 16:14:07 +0200
Thank you. I did that and it seems to work now.
--
Regards,
Diego F.
"brianlanning" <brianlanning@xxxxxxxxx> wrote in message
news:1183036226.914825.10450@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jun 28, 7:12 am, "Diego F." <diego_f...@xxxxxxx> wrote:
Hello. I don't know how to force the closing of a blocked socket.
I have an server application that listens to a port. It works as it is
very
simple, but I'm not sure about how to close the socket.
I use a thread to run the socket part, so I don't block the user
interface.
If I close the application, and open again, the port is still in use.
I try to suspend the thread, but it doesn't work also.
How can I do that?
When you created the thread that manages the socket, did you set the
IsBackground flag to true? If you do that, the OS will terminate your
child threads when the main application closes.
http://msdn2.microsoft.com/en-us/library/system.threading.thread.isbackground.aspx
brian
.
- References:
- How to close a blocked socket
- From: Diego F.
- Re: How to close a blocked socket
- From: brianlanning
- How to close a blocked socket
- Prev by Date: Re: How to pass textBox.Text to Sql query
- Next by Date: Re: Web Reference
- Previous by thread: Re: How to close a blocked socket
- Next by thread: Re: How to close a blocked socket
- Index(es):
Relevant Pages
|