🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #972

Re: Messenger Application

#972
From: Remy Lebeau (TeamB)
Date: Thu, 02 Mar 2006 21:58
31 lines
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
Technical Details
Message-ID: <44076a77$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44073079$1@newsgroups.borland.com> <440732dc$1@newsgroups.borland.com> <44074275$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,85a0193ddf7aaaf0
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.web
References: <44073079$1@newsgroups.borland.com> <440732dc$1@newsgroups.borland.com> <44074275$1@newsgroups.borland.com>
Subject: Re: Messenger Application
Date: Thu, 2 Mar 2006 13:58:24 -0800
Lines: 33
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <44076a77$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1141336695 68.69.17.41 (2 Mar 2006 13:58:15 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail