Article View: borland.public.cppbuilder.internet.socket
Article #2282Is the server reachable?
From: sez
Date: Tue, 06 Jun 2006 02:33
Date: Tue, 06 Jun 2006 02:33
28 lines
1603 bytes
1603 bytes
Hello,
I'm developing p2p chess program including indy tcp server and client.
My computer uses router. I changed some options from "virtual server" and
added port of the program. I activate server, my friend can connect me as a
client. Everything seems ok.
However, the server side must detect if the server is reachable or not.
For example, if I wouldn't add the port, my friend would get connection
error.
In order to prevent this, when I activate the server, the program must check
if the server is reachable.
e.g
if (is_reachable())
ShowMessage("Ok, your peer can connect to you.");
else
ShowMessage("You are using router and have to add a port to virtual
server.");
is_reachable(){
// What can I write here?
}
Thanks,
Sezgin
Technical Details
Message-ID:
<4484e97d@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,213cc464ab5ebf2,start X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "sez" <www@sezginserin.com> From: "sez" <www@sezginserin.com> Newsgroups: borland.public.cppbuilder.internet.socket Subject: Is the server reachable? Date: Tue, 6 Jun 2006 05:33:31 +0300 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 NNTP-Posting-Host: 81.213.98.24 Message-ID: <4484e97d@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1149561213 81.213.98.24 (5 Jun 2006 19:33:33 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail