Newsgroups : Borland : borland.public.delphi.internet.winsock : 2005 Sep : Indy reading from a server and writing to a client
| Subject: | Indy reading from a server and writing to a client |
| Posted by: | "Jose Maria Veneroso" (jmve..@sgie.com) |
| Date: | Thu, 15 Sep 2005 19:27:53 |
I'm trying to write an image server that can read and write as the same
time. I explain :
My TCPServer (SERVER1) recieve a request for a file from a TCPClient.
This file is locate in another TCPServer (SERVER2). In the thread of the
TCPServer (SERVER1) i create a new TCPClient that connect to the SERVER2 and
start downloading the file to the server to send it to the client that have
request it.
Doing that with whole file is no a problem (dowloading all the file, via
a readstream, to the SERVER1 and writing it to the client, via a
writestream). The problem is that i need to send the file to the client
while the file is been downloading from the SERVER2.
TCPCLIENT --request file--> SERVER1 -- requestfile--> SERVER2
TCPCLIENT <--- sendfile-- SERVER1 <-- sendfile -- SERVER2
I think that could be down with writebuffer an readbuffer or something
like that...
any help will be welcome..
thanks