Sending file based on request from the client

M

Mithil

Hello everyone,

Could some one please tell me how to send a file only when a request
is made by the client using a client server model. I have got a client
and server program running and server can send files to the client but
I don't know how to make it work only if there is a request by a
client a server should start up and send files. Any help would be
greatly appreciated !!!!

Thanks in advance,
Mithil
 
C

christopher

mithil -- this post doesn't make any sense. you say you have a
'client
and server program running'. You will have to be a lot more specific,
because if the client and server are 'talking' then one should be able
to respond to the other. how are you establishing the connection?
webpage? applet? servlet? sockets? what succeeds? what fails?
 
M

Martin Gregorie

mithil -- this post doesn't make any sense. you say you have a
'client
and server program running'. You will have to be a lot more specific,
because if the client and server are 'talking' then one should be able
to respond to the other. how are you establishing the connection?
webpage? applet? servlet? sockets? what succeeds? what fails?
Obvious answer: a server NEVER originates an action. It only ever
response to a request by a client. Although is usual for the response to
be (relatively) instant this doesn't stop the client sending a request
like "tell me if 'X' happens".

If you really mean that the server isn't normally running and only
starts when a client connects to it, that';s a different, OS-specific
case. I would use the xinetd super-server to start the application
server but then I'm running Linux. That won't work for all OSen but you
forgot to say what OS you're using.
 

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,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top