🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #7672

Re: Running socket code in the jbuilder

#7672
From: Russell
Date: Tue, 05 Jun 2001 01:24
39 lines
2222 bytes
Hi , 
  thanks for your info. I can get instance of ServerSocket.
  However, i try to call the accept method as code below : look like it
cannot accept any connection from server.

 try {
            serverSocket = new ServerSocket(8080);
        } catch (IOException e) {
            System.err.println("Could not listen on port: 4444.");
            System.exit(1);
        }

 Socket clientSocket = null;
        try {
            clientSocket = serverSocket.accept(); <--- debugger hang
here 
        } catch (IOException e) {
            System.err.println("Accept failed.");
            System.exit(1);
        }
 
 Do you have any idea why ?? Thanks. 
 
Anduin Withers wrote:
> 
> >  I cannot connect to KnockClient using Socket() , everything it give me
> > the error = "java.net.ConnectExeption : Connection Refused"
> >
> >   Anybody have any ideas ? Below is the KnockClient code :
> 
> What evidence do you have that "Connection Refused" is a bad error?
> 
> On your linux box try 'telnet 0 3283' and see what it says.
> 
> The most likely cause is that there is no server on the machine bound on
> port 3283.
> 
> --
> Anduin Withers
Technical Details
Message-ID: <3B1C34C3.5B4ABD75@cesmainternational.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-was.dfn.de!news-koe1.dfn.de!RRZ.Uni-Koeln.DE!nntp.CS.Uni-Magdeburg.De!PeerFeed.KWeb.on.ca!dnews
References: <3B1B1D07.A7418BDB@cesmainternational.com> <3b1b6433$1_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,334e51a05bea46e0
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-06-04 18:29:57 PST
Message-ID: <3B1C34C3.5B4ABD75@cesmainternational.com>
Date: Tue, 05 Jun 2001 09:24:20 +0800
From: Russell <weetat@cesmainternational.com>
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.13-0.13 i686)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: Running socket code in the jbuilder
References: <3B1B1D07.A7418BDB@cesmainternational.com> <3b1b6433$1_1@dnews>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 203.126.155.39
X-Trace: dnews 991704293 203.126.155.39 (4 Jun 2001 18:24:53 -0700)
Lines: 39
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-was.dfn.de!news-koe1.dfn.de!RRZ.Uni-Koeln.DE!nntp.CS.Uni-Magdeburg.De!PeerFeed.KWeb.on.ca!dnews