Well, you're trying to listen on port 2000 and the error message tells you it can't get that port. That probably means something else is already running and listening on that port (and given I see an entry in /etc/services saying that's an assigned port it's entirely reasonable; not to mention 2000's close enough to 1024 that I don't doubt something else could have gotten in for outgoing traffic on a heavily used box).
Pick a different (higher; try 9999) port number and see if you get the same error.
Update: Aaah, it's your client script that's producing the error. Never mind me, I misread. Where's my caffeine . . .Hrmm, are you sure your listener's running? Does it print out the line after you check that $sock is defined? If you check with lsof does the process appear to have the socket open (presuming you're on some flavour of *NIX here)?
I'd still try a different port just for kicks as well.
In reply to Re: Simple Sockets
by Fletch
in thread Simple Sockets
by stellagoddc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |