🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

How to tell if a Socket has closed?

#2568
From: Gkingsley
Date: Fri, 15 Sep 2000 00:00
14 lines
995 bytes
Hello All,

I have a server application that opens a ServerSocket and then accepts
Socket connections from clients. How can I tell if the client has reset the
connection? I come from the Delphi world where I would just get an event
fired at me, but the Java API does not appear to be set up this way.

We are currently using a time out, but it is important to close the Socket
as quickly as possible because this application only allows one client
connection at a time. Can anyone help me?


Regards,
Gavin Kingsley.
Technical Details
Message-ID: <8prdna$r7g7@bornews.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: 1089d0,98b7dc786d67794b,start
X-Google-Attributes: gid1089d0,public
From: "Gkingsley" <gkingsle@swichtec.co.nz>
Subject: How to tell if a Socket has closed?
Date: 2000/09/15
Message-ID: <8prdna$r7g7@bornews.borland.com>
X-Deja-AN: 669790467
Organization: Another Netscape Collabra Server User
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700
Newsgroups: borland.public.jbuilder.java.api