Any one help me?

A

Arul hari

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
 
H

hemant

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.
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.

--
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top