Keep http client connection open and feed it data?

Just starting out? Need help? Post your questions and find answers here.
vwidmer
Enthusiast
Enthusiast
Posts: 282
Joined: Mon Jan 20, 2014 6:32 pm

Keep http client connection open and feed it data?

Post by vwidmer »

I not sure how to do or if it is even possible but is there a way can have a http connection accepted by client and then have the program download something like a file and spit it out to the client.

But then when the download is finished it will not close the client connection it will start on next file and spit it out to client?

Hope that some one understands what I would like to try?

Any ideas / code would be helpful.

Thanks
Last edited by vwidmer on Fri Mar 15, 2019 12:18 am, edited 1 time in total.
WARNING: I dont know what I am doing! I just put stuff here and there and sometimes like magic it works. So please improve on my code and post your changes so I can learn more. TIA
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 627
Joined: Fri Dec 04, 2015 9:26 pm

Re: Keep tcp client connection open and feed it data?

Post by skinkairewalker »

Did you mean: Http Connection, or TCP Socket?
vwidmer
Enthusiast
Enthusiast
Posts: 282
Joined: Mon Jan 20, 2014 6:32 pm

Re: Keep tcp client connection open and feed it data?

Post by vwidmer »

http I guess..

like want to download files but keep feeding them to client..

example:

APP has list of say 10 urls with txt files.. http://domain.tld/somefiles.txt

you then make http connection to the APP and it starts downloading the first file and as it downloading it kind of just pipes it directly to the client that is connected to the APP but when the file finishes downloading instead of closing the connection to the client it just connects to the next url and continues feeding it to the client...

Thanks
WARNING: I dont know what I am doing! I just put stuff here and there and sometimes like magic it works. So please improve on my code and post your changes so I can learn more. TIA
Post Reply