🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Closing Sockets

#681
From: Shankar Unni
Date: Fri, 18 Feb 2005 21:07
16 lines
1632 bytes
lans wrote:

> out.close()
> in.close()
> socket.close()

A little bit more information, please?

What are "out" and "in"? Are they connected to the socket? If so, how 
does your logic do the connection? Every time you open the socket, do 
you immediately connect "out" and "in" to the socket? If so, you're OK, 
since you'll get a brand new out and in.

But it's generally good etiquette to close any streams that you open. 
Also, for sockets, it's polite to shut down the socket cleanly before 
closing it.  (See Socket.shutdownInput() and Socket.shutdownOutput()).
Technical Details
Message-ID: <42165906$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4216486c$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: f74b3,6bffc2bbc580287c
X-Google-Attributes: gidf74b3,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Fri, 18 Feb 2005 13:07:20 -0800
From: Shankar Unni <shankarunni@netscape.net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041201 Thunderbird/1.0RC1 Mnenhy/0.7
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language
Subject: Re: Closing Sockets
References: <4216486c$1@newsgroups.borland.com>
In-Reply-To: <4216486c$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 68.120.146.125
Message-ID: <42165906$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1108760838 68.120.146.125 (18 Feb 2005 13:07:18 -0800)
Lines: 16
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!212.101.4.254.MISMATCH!solnet.ch!solnet.ch!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail