Re: Detecting network change
Re: Detecting network change
- Subject: Re: Detecting network change
- From: Jens Alfke <email@hidden>
- Date: Thu, 23 Oct 2008 17:03:17 -0700
On Oct 23, 2008, at 4:42 PM, Greg wrote: Very interesting. I'm still not sure though this was the best decision on (whoever's) part, because the socket becomes unreadable and unwritable while you're on that other network; essentially a zombie socket, which isn't very useful anyhow. Perhaps it will reanimate if you switch back to the other network, but why would you do that or want that behavior?
For one thing, the network change might be very short-lived. If you have to briefly unplug and replug a network cable to move a machine, or if the cable accidentally got yanked out and then put back, or if you lose your WiFi signal for a second and then regain it, it can be nice that sockets continue on instead of all suddenly disconnecting. Especially in a server environment. I think that this situation is exceptional enough to warrant a special error of some kind. But then again, I'm too young to be questioning the saints of old... those legendary programmers responsible for my YouTube fix...
Keep in mind that at the time TCP/IP was designed [circa '77?] the computers on the ARPAnet were the size of refrigerators and were never moved around while powered up. Network connections were made by screwed-on coax cables. IP addresses were assigned by hand-editing routing tables. The idea of a computer flitting from one network to another, let alone a pocket-sized computer with a wireless network, was total science fiction. By the time network mobility became real, the protocols and socket APIs were standardized and relied upon by a lot of important software, so changing them wasn't possible.
—Jens |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden