From: Devis Battisti Date: 2008-10-30T02:54:04+09:00 Subject: Re: socket from python to ruby > However, they have (unusually) decided to bind the socket to a specific > local port. This might be because of firewall rules. yes, I thin so. > > Without this you could just do: > > s = TCPSocket.new(cfg.remote_host, cfg.remote_port) > s.write(mex) > recv = s.read(4096) > no, it doesn't work: it remains in attemp of response. > If you really need to bind the local port for an outbound connection, I > think you'll have to use the lower-level Socket class directly, which is > not particularly well documented, but should correspond roughly to your > python code. Unfortunately you'll need to do some sockaddr packing. > > http://www.ruby-doc.org/docs/ProgrammingRuby/html/lib_network.html thanks for the answer, I will continue to try... Devis_ -- Posted via http://www.ruby-forum.com/.