| View previous topic :: View next topic |
| Author |
Message |
SD Guest
|
Posted: Wed Sep 07, 2005 11:54 am Post subject: TCPClient to read an HTML page ? |
|
|
Can I use a TCPClient to access and read an HTML page hosted
in a webserver ? I don't would to use the TIdHTTP object because
I've already open a TCPClient to a site in which port 80 get me
HTML contents and port 1080 get me TCP contents...
Thank you very much..
|
|
| Back to top |
|
 |
Martin James Guest
|
Posted: Wed Sep 07, 2005 12:18 pm Post subject: Re: TCPClient to read an HTML page ? |
|
|
| Quote: | Can I use a TCPClient to access and read an HTML page hosted
in a webserver ? I don't would to use the TIdHTTP object because
I've already open a TCPClient to a site in which port 80 get me
HTML contents and port 1080 get me TCP contents...
|
I don't see your problem with HTTP. The 'port 80' is the listening port for
the HTTP servers on the remote sites. You can have loads of TidHTTP clients
running to different sites/servers. In fact, you can have several TidHTTP's
working against the same server, if you want, (unless the server itself has
some restriction on multiple connections from the same client IP).
Same with 'plain' TCP clients - open as many as you want, (within reason!).
Rgds,
Martin
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Wed Sep 07, 2005 6:09 pm Post subject: Re: TCPClient to read an HTML page ? |
|
|
"SD" <nospawm (AT) please (DOT) it> wrote
| Quote: | Can I use a TCPClient to access and read an HTML
page hosted in a webserver ?
|
Technically yes, though you would have to implement the HTTP protocol
manually. I do not advise doing that as the protocol can be quite complex
to implement manually.
| Quote: | I don't would to use the TIdHTTP object
|
Why not? You should. It already does all of the hard work for you.
| Quote: | I've already open a TCPClient to a site in which port 80
get me HTML contents and port 1080 get me TCP contents...
|
So? Why can't you switch over to an HTTP client component for port 80?
There is nothing stopping you from using multiple components for different
purposes.
Gambit
|
|
| Back to top |
|
 |
Ben Hochstrasser Guest
|
Posted: Wed Sep 07, 2005 6:20 pm Post subject: Re: TCPClient to read an HTML page ? |
|
|
SD wrote:
| Quote: | I've already open a TCPClient to a site in which port 80 get me
HTML contents and port 1080 get me TCP contents...
|
Hmm. I suggest some further reading about "source ports" and "destination
ports".
--
Ben
|
|
| Back to top |
|
 |
|