Thread View: borland.public.cppbuilder.internet.web
4 messages
4 total messages
Started by Hamid
Thu, 02 Mar 2006 16:50
Messenger Application
Author: Hamid
Date: Thu, 02 Mar 2006 16:50
Date: Thu, 02 Mar 2006 16:50
4 lines
1092 bytes
1092 bytes
How can I retrieve the complete IP of a client (the valid IP and what that is behind a proxy server). I would like to know how I can develop a client/server application like messengers. It requires that the server have the complete address of its client in order to send its messages to the server which is to be listening in the client side. Thanx,
Re: Messenger Application
Author: Remy Lebeau (TeamB)
Date: Thu, 02 Mar 2006 18:02
Date: Thu, 02 Mar 2006 18:02
24 lines
1897 bytes
1897 bytes
"Hamid" <hrz_mir@Yahoo.com> wrote in message news:44073079$1@newsgroups.borland.com... > How can I retrieve the complete IP of a client (the valid > IP and what that is behind a proxy server). There is no way to automatically determine the IP that is behind the proxy. The client will have to send it manually in a data packet after it connects. You can then compare it to the IP that the socket reports. If they match, then no proxy is being used. > I would like to know how I can develop a client/server application > like messengers. It requires that the server have the complete address > of its client in order to send its messages to the server which is to be > listening in the client side. The socket will report the public IP that it sees itself attached to. That is the IP that you always send data to. The IP behind the proxy is not directly accessible, nor should you be trying to send data to it directly anyway when a proxy is present. Always send to the proxy's IP. Gambit
Re: Messenger Application
Author: Hamid
Date: Thu, 02 Mar 2006 18:07
Date: Thu, 02 Mar 2006 18:07
33 lines
2303 bytes
2303 bytes
Thanx for your reply. When we connect to the internet by using an ISP, there maybe no valid IP available for the client. In this case how the messenger server can retrieve the client IP automatically in order to be able to make a connection with its client? Can I for example with an Indy HTTP client/server design such client/servers? Thanx, "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> wrote: > >"Hamid" <hrz_mir@Yahoo.com> wrote in message >news:44073079$1@newsgroups.borland.com... > >> How can I retrieve the complete IP of a client (the valid >> IP and what that is behind a proxy server). > >There is no way to automatically determine the IP that is behind the proxy. >The client will have to send it manually in a data packet after it connects. >You can then compare it to the IP that the socket reports. If they match, >then no proxy is being used. > >> I would like to know how I can develop a client/server application >> like messengers. It requires that the server have the complete address >> of its client in order to send its messages to the server which is to be >> listening in the client side. > >The socket will report the public IP that it sees itself attached to. That >is the IP that you always send data to. The IP behind the proxy is not >directly accessible, nor should you be trying to send data to it directly >anyway when a proxy is present. Always send to the proxy's IP. > > >Gambit > >
Re: Messenger Application
Author: Remy Lebeau (TeamB)
Date: Thu, 02 Mar 2006 21:58
Date: Thu, 02 Mar 2006 21:58
31 lines
2387 bytes
2387 bytes
"Hamid" <hrz_mir@Yahoo.com> wrote in message news:44074275$1@newsgroups.borland.com... > When we connect to the internet by using an ISP, > there maybe no valid IP available for the client. Not true. There is always an IP available. You cannot have a socket connection without IP addresses on both ends of the socket. If the client is on a network, then the client gets a private IP assigned by the network, and the network router then has its own IP assigned by its network (the Internet is just a big network - conneting to an ISP is just a matter of connecting to the ISP's network, which in turn is connected to a larger network, and so on). If the client is connected directly to the Internet, then the client gets a public IP assigned by the ISP. > In this case how the messenger server can retrieve the client IP > automatically in order to be able to make a connection with its client? I already told you earlier what you need to do. The client must explicitally send its local IP (either its private IP if on a network, or its public IP if connected directly to the ISP) in a data packet after it connects to the server. The server can then compare that to the IP that the socket itself reports as the client's IP. Always send data to the IP that the socket says it is actually connected to, never to the IP that the client sends. So, what EXACTLY are you having a problem with? Gambit
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads