From: Francis Cianfrocca Date: 2006-08-03T22:46:54+09:00 Subject: Re: TCPSocket: bind method missing On 8/3/06, Hadmut Danisch wrote: > Hi, > > I just tried to write an rsh client in Ruby. > > I ran into the problem that Ruby offers only a TCPSocket class, where > you can just give the hostname and the port of the peer, but not the > local port number to bind to. > > This is really important for some protocols, e.g. all protocols > requiring privileged connections. > > > Any idea why this is missing or how to workaround the problem? > > regards > Hadmut > > > Have you tried using the Socket class? You have to set your own parameters (SOCK_STREAM, AF_INET, etc) but it definitely has #bind.