🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Connection refused ??

#16334
From: Robert A. Wolf III
Date: Mon, 01 Mar 1999 00:00
31 lines
1164 bytes
Hi,

I keep getting Connection refused using this code:

InetAddress addr = InetAddress.getLocalHost();
      String Saddr = addr.getHostAddress();
      String SNaddr = addr.getHostName();
      textArea1.append("\n"+"Host Address: " + Saddr +"\n");
      textArea1.append("\n"+"Host Name: " + SNaddr +"\n");

      InetAddress Naddr = InetAddress.getByName(Saddr);

      try
      {
      Socket SMTPsocket = new Socket(Naddr,25);
      SMTPsocket.close();
      }
      catch(IOException IOex)
      {
        textArea1.append("\n"+"IOex: " + IOex +"\n");
      }

This is what I get:

IOex: java.net.ConnectException: Connection refused

Any Ideas?

Thank,

Robert
Technical Details
Message-ID: <7bfig8$re212@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,1a65a97c39315526,start
X-Google-Attributes: gidf74b3,public
From: "Robert A. Wolf III" <mailbox@pre-engineering.com>
Subject: Connection refused ??
Date: 1999/03/01
Message-ID: <7bfig8$re212@forums.borland.com>
X-Deja-AN: 450206342
Organization: Another Netscape Collabra Server User
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Newsgroups: borland.public.jbuilder.java.language