Re: Socket Programming: How to terminate a thread "listening" for UDP packets?
- From: keith@xxxxxxxxxxxxxxxxxx
- Date: Thu, 17 Jan 2008 05:17:33 -0800 (PST)
On 16 Jan, 19:15, David Schwartz <dav...@xxxxxxxxxxxxx> wrote:
On Jan 16, 7:44 am, Lars Uffmann <a...@xxxxxxxxxxxxxx> wrote:
What's the "natural" approach to "defuse" a function that is listening
for incoming packets?
There are several ways, some of which naturally fit your situation and
some of which don't:
I'm not sure, but this sounds _similar_ to a problem I'm having at the
moment. I've got a daemon on each of two boxes, tunneling SCTP over
UDP. On each box there is a client connected to 'its' daemon. The
problem I have is that whichever client terminates first, it leaves
the daemon on that box in an unconnectable state.
It seems that the daemon detects that the link to the remote client is
down, and then tries to notify the local client of the changed state,
resulting in a ECONNREFUSED errno. When the local client restarts, it
is unable to reconnect to the daemon for some reason.
The _second_ client to terminate is just fine, and when restarted,
will reconnect to its daemon with no problems.
It's not my code, so I'm struggling to see what is going on...
.
- References:
- Socket Programming: How to terminate a thread "listening" for UDP packets?
- From: Lars Uffmann
- Re: Socket Programming: How to terminate a thread "listening" for UDP packets?
- From: David Schwartz
- Socket Programming: How to terminate a thread "listening" for UDP packets?
- Prev by Date: Re: socket programming again: possible to *sniff* udp packets before buffer is emptied?
- Next by Date: tutorials
- Previous by thread: Re: Socket Programming: How to terminate a thread "listening" for UDP packets?
- Next by thread: Re: Socket Programming: How to terminate a thread "listening" for UDP packets?
- Index(es):
Relevant Pages
|