Article View: borland.public.cppbuilder.internet.socket
Article #1508Re: Socket Connections through the Web and a router using NAT?
From: chris
Date: Wed, 10 Jan 2007 20:06
Date: Wed, 10 Jan 2007 20:06
37 lines
2229 bytes
2229 bytes
> >Then you are doing something else wrong. Make sure that your client >really is trying to connect to 123.45.67.89:6111 and not >192.168.1.17:6111, and that the SocketSever program really is >listening on 192.168.1.17 on the port that is being forwarded to. I do this. I have a text box where I can manually type in the address, "123.45.67.89:6111". The SocketServer program is running on 192.168.1.17 and listening on the same port. It works on the LAN, so I know the server program is listening correctly. >What kind of server socket component are you using (if any)? I am using the TServerSocket Component from Borland's C++ Builder 6. And on the client side I am using TClientSocket. >How are you binding it when starting to listen for connections? I really don't understand what you mean by "binding it". I do know that with the TServerSocket Component, when I set "ServerSocket1->Active = true;" the Socket begins to listen on its specified port at that moment. All I do then with my Client Application is Set ClientSocket1->Host = "123.45.67.89:6111"(or "192.168.1.17" on the LAN, which works) then, ClientSocket1->Port = 6111; ClientSocket1->Active = true; ClientSocket1->Socket->Connect(0); (The above works on the LAN as well) Chris
Technical Details
Message-ID:
<45a5472e$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.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-mailReferences:
<45a5011b$1@newsgroups.borland.com> <45a5373f$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,f2ef1bbb95928174 X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "chris" <computer@programmer.com> Sender: "chris" <computer@programmer.com> Reply-To: "chris" <computer@programmer.com> Subject: Re: Socket Connections through the Web and a router using NAT? Newsgroups: borland.public.cppbuilder.internet.socket X-User-Info: 70.46.79.254 References: <45a5011b$1@newsgroups.borland.com> <45a5373f$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <45a5472e$1@newsgroups.borland.com> Date: 10 Jan 2007 12:06:06 -0800 X-Trace: newsgroups.borland.com 1168459566 207.105.83.66 (10 Jan 2007 12:06:06 -0800) Lines: 37 Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news4.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