Re: Peristent Listen over an HTTP connection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



chetan rane wrote:
same TCP creation,

because i i am bindiing that stream to the Server.

i am actually creating a component.

a component which resides in between a client and server

i accept HTTP requests from a client and relay the same uysing a TCP
connection to the SERVER.
and vice versa

i think this makes it clear.
I think what you want to look for is how to write a socket server. You'll find a lot about this via google. A socket server lets you open up a persistent port for listening with a process that runs continually in the background and then allows you to spawn off multiple sockets as they come in, like a web server or ftp or ssh. My guess is that there's a fair amount of complexity here that you'll have to investigate. For instance, you'll have to preempt port 80, the standard port on which httpd listens, forward the http request to your web server on a local port, retrieve the response and pass it back to the client. And presumably you'll have to be doing this for multiple clients. I think someone on this list suggested using AJAX. That would be much simpler. If you had to have data persistence, for instance, you could store data in temporary files on the server or in temporary database entries, or you could simply pass data back and forth using POST. The script which handles the AJAX requests would be the "component" that resides on the server.


_____________________
Myron Turner
http://www.room535.org
http://www.bstatzero.org
http://www.mturner.org/XML_PullParser/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux