From: Bigmac Turdsplash Date: 2009-05-12T09:18:51+09:00 Subject: Re: File over tcp? with out using net/ftp > file = File.new('file.jpg', 'b') > destFile = File.new('file-received.jpg', 'wb') I figured this out the other day... im still having trouble getting the client to download a file from the server... the process is in my head but i cant implement this... This is my attempt... i have been playing around with this code but i cant figure it out... #server.rb require 'socket' fileContent = File.read('text.txt') sock = TCPServer.open(2000) con = sock.accept sock.print fileContent sock.close #client.rb require 'socket' sock = TCPSocket.open('localhost', 2000) destFile = File.new('c:\\hacked\\text.txt', 'w') destFile.print destFile.close -- Posted via http://www.ruby-forum.com/.