From: Stefan Rusterholz Date: 2008-10-30T21:35:14+09:00 Subject: Re: socket from python to ruby Brian Candler wrote: > However, they have (unusually) decided to bind the socket to a specific > local port. This might be because of firewall rules. > > Without this you could just do: > > s = TCPSocket.new(cfg.remote_host, cfg.remote_port) TCPSocket::open accepts local host and port args, from the docs (1.8.7): >> TCPSocket.new(remote_host, remote_port, local_host=nil, local_port=nil) Regards Stefan -- Posted via http://www.ruby-forum.com/.