Article View: borland.public.jbuilder.java.api
Article #972need advice on Socket class
From: Alan Shiers
Date: Sat, 29 Jun 2002 14:35
Date: Sat, 29 Jun 2002 14:35
37 lines
2173 bytes
2173 bytes
Hi there, I've created a client/server application using a Socket on the client-side. The constructor I'm using for it is: Socket(String host, int port) For testing purposes I've been connecting all along to the server-side app on a seperate computer on the same LAN whose IP address is: 192.168.0.196 I've been using Port 5000 for the second arguement of the Socket constructor. Up until now this has been working great. But...here is where the wrench gets thrown in. The LAN is connected to the Internet via a cable modem and router. I configured the router to direct all request traffic to IP address 192.168.0.196 on port 5000. I have a registered Domain name: "mss-webdesign.ca" and it is resolved to the IP address of the router: 24.222.101.2 So, theoretically, I thought, I should be able to replace now the IP address 192.168.0.196 with the URL: http://www.mss-webdesign.ca on port 5000 and still be able to connect. No-o-o! That's not what happens! I wind up getting an exception thrown at me. According to the documentation I'm supposed to be able to provide a URL and the Socket class should still be able to take this string and connect. Has anyone had this problem before? Please advise, Alan
Technical Details
Message-ID:
<3D1DC5BD.D42C0685@hfx.eastlink.ca>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-08!supernews.com!logbridge.uoregon.edu!kibo.news.demon.net!demon!colt.net!newspeer.clara.net!news.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,ca7b36f31cbe071c,start X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2002-06-29 06:51:14 PST Message-ID: <3D1DC5BD.D42C0685@hfx.eastlink.ca> Date: Sat, 29 Jun 2002 10:35:41 -0400 From: Alan Shiers <ashiers@hfx.eastlink.ca> Organization: Mustard Seed Software X-Mailer: Mozilla 4.78 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.api Subject: need advice on Socket class Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.222.101.2 X-Trace: dnews 1025357569 24.222.101.2 (29 Jun 2002 06:32:49 -0700) Lines: 37 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-08!supernews.com!logbridge.uoregon.edu!kibo.news.demon.net!demon!colt.net!newspeer.clara.net!news.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews