From: William Djaja Tjokroaminata Date: 2002-11-08T02:08:46+09:00 Subject: Re: A Question About TCPSocket Austin Ziegler wrote: > On Thu, 7 Nov 2002 23:48:51 +0900, ??? wrote: >>Hello, >> I create an object of TCPSocket. Now I can use method "write" to >>send a string. >>What method that I can send a file using TCPSocket? > Well, in Ruby terms, a file is just a string -- once it's read in. (deleted) > There's no reason that you can't end up treating the TCPSocket the > same way. Well, and in TCP terms, a stream is a stream, whether it was created from a (Ruby) string or from a file. If the intention is to transfer a file using TCP then it is much better and easier to use a Ruby library of FTP instead of reinventing the wheel (well, at least FTP opens two TCP connections, one for data channel and one for control channel). Regards, Bill