🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #974

Re: need advice on Socket class

#974
From: John McGrath TeamB
Date: Sat, 29 Jun 2002 15:53
25 lines
1899 bytes
On Sat, 29 Jun 2002 10:35:41 -0400, Alan Shiers wrote:

> 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)

> 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.

The argument to the Socket constructor is a host name, not a URL or a 
URL string.  The URL specifies a host name, but it also specifies a 
protocol and other information which does not apply.  Your program is 
using an IP socket, but it is not using the protocol "http".

Try changing the argument to "www.mss-webdesign.ca".

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <MPG.1787a1ffb01ea2b98b778@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-01!supernews.com!news-xfer.siscom.net!image.surnet.ru!surnet.ru!newspeer.clara.net!news.clara.net!newsfeed.news2me.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!lsanca1-snf1!news.gtei.net!enterprise!news.xtra.co.nz!newsfeeds.ihug.co.nz!ihug.co.nz!dnews
References: <3D1DC5BD.D42C0685@hfx.eastlink.ca>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,ca7b36f31cbe071c
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2002-06-29 09:02:29 PST
From: John McGrath  [TeamB] <ng-b@JPMcGrath.net>
Newsgroups: borland.public.jbuilder.java.api
Subject: Re: need advice on Socket class
Date: Sat, 29 Jun 2002 11:53:24 -0400
Message-ID: <MPG.1787a1ffb01ea2b98b778@newsgroups.borland.com>
References: <3D1DC5BD.D42C0685@hfx.eastlink.ca>
X-Newsreader: MicroPlanet Gravity v2.60
NNTP-Posting-Host: 209.92.40.60
X-Trace: dnews 1025366003 209.92.40.60 (29 Jun 2002 08:53:23 -0700)
Lines: 25
X-Authenticated-User: jpmcgrath
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-01!supernews.com!news-xfer.siscom.net!image.surnet.ru!surnet.ru!newspeer.clara.net!news.clara.net!newsfeed.news2me.com!newsfeed2.earthlink.net!newsfeed.earthlink.net!lsanca1-snf1!news.gtei.net!enterprise!news.xtra.co.nz!newsfeeds.ihug.co.nz!ihug.co.nz!dnews