From: "Brian Schröder" Date: 2005-01-21T18:49:51+09:00 Subject: Re: server connection On Fri, 21 Jan 2005 01:33:09 +0900 Barry Sperling wrote: > Hi, > I'm trying to learn some basic networking and I've tried to run the > code from the Pragmatic Programmer in the Class TCPServer which connects > to a server and then returns the date and time ( as in Steven's > Networking book ). I am using a W2K machine and have started an Apache > service, which comes attached to Oracle. When I use 127.0.0.1 or call a > server that I am linked to on a LAN, I get the same error > "Only one usage of each socket address is normally permitted" > > I get this error when I run it as an rbw through Scite, or from the > command line. What do I need to do to make a server connection? > Thanks, > Barry > > > Maybe you are opening up a TCPServer that tries to listen on port 80 or some other port that is already in usage. There is some command in windows to list the used ports, I just don't rember which. For a simple TCP example program see the explanation in my ruby-course slides and the chat sources: http://ruby.brian-schroeder.de/course/ Regards, Brian