Any one help me?

Dear friends,
          I am unable to findout the answers for this question?
I am having one server socket program ans one client program.
server program:
<---------------->
<----------------->

./server.rb -p 1234

client program:
<------------------>
<------------------>

./client.rb -p 1234

Now I want to send one file to client that is available in current
directory.
Both the client and server is runnig under this
directory[vellingiri@fountserver].
Thsi is having some files ,for instance,

1.rb 2.rb 3.rb 4.rb sserver.rb client.rb

Is there any method to send a one file from client to server.Please
could anybody tell me.
In c we are using the sendfile library function,same way in ruby is
there any way.

by
Vellingiri

···

--
Posted via http://www.ruby-forum.com/.

If you are using EventMachine library for instance for writing server,
then it does offer a method send_file_content for sending files across
network. Otherwise, I suppose, you can stream the file over the
socket. Or else, there might be bindings for sendfile library in ruby.

···

On 10/25/07, Arul hari <hariharan.spc@rediffmail.com> wrote:

Dear friends,
          I am unable to findout the answers for this question?
I am having one server socket program ans one client program.
server program:
<---------------->
<----------------->

./server.rb -p 1234

client program:
<------------------>
<------------------>

./client.rb -p 1234

Now I want to send one file to client that is available in current
directory.
Both the client and server is runnig under this
directory[vellingiri@fountserver].
Thsi is having some files ,for instance,

1.rb 2.rb 3.rb 4.rb sserver.rb client.rb

Is there any method to send a one file from client to server.Please
could anybody tell me.
In c we are using the sendfile library function,same way in ruby is
there any way.

--
Let them talk of their oriental summer climes of everlasting
conservatories; give me the privilege of making my own summer with my
own coals.

http://gnufied.org

Is there any method to send a one file from client to server.Please
could anybody tell me.
In c we are using the sendfile library function,same way in ruby is
there any way.

by
Vellingiri

http://rubyforge.org/projects/ruby-sendfile

···

--
Posted via http://www.ruby-forum.com/\.