From: Bigmac Turdsplash Date: 2009-05-09T08:53:15+09:00 Subject: Re: File over tcp? with out using net/ftp Robert Klemme wrote: > On 08.05.2009 01:51, Bigmac Turdsplash wrote: >> Im trying to send a file back and forth between a client.rb and >> server.rb... >> >> How can i do this with out using ftp? > > You can use DRb or simply stream it through a socket. > > Kind regards > > robert I have been doing a lot of google'n trying to find example code for sending files threw the socket... I would really like to see some exmaple code for the client and server... im clueless... server.rb require 'socket' data = file.socket("c:\\file.txt") #???????????? server = TCPServer.new(1234) loop do Thread.start(server.accept) do |connection| print connection connection.write(data) end end -- Posted via http://www.ruby-forum.com/.