From: Brian Candler Date: 2009-05-12T16:31:10+09:00 Subject: Re: File over tcp? with out using net/ftp Bigmac Turdsplash wrote: > #client.rb > require 'socket' > > sock = TCPSocket.open('localhost', 2000) > destFile = File.new('c:\\hacked\\text.txt', 'w') > destFile.print That prints nothing to destFile. You probably need something like: data = sock.read destFile.print data Your server also needs to loop accepting connections, and ideally threads to service multiple clients concurrently. Have a look at gserver.rb in the standard library. -- Posted via http://www.ruby-forum.com/.