Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Any one help me?
Vellingiri Arul
10/25/2007 9:04:00 AM
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-...
.
2 Answers
hemant
10/25/2007 11:10:00 AM
0
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.
>
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://g...
Michael Linfield
10/25/2007 11:34:00 PM
0
> 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/rub...
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Any one help me?
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password