[4853] in java-interest
Re: Beta2 changes socket.close() behaviour ?
daemon@ATHENA.MIT.EDU (Bob Beck)
Tue Jan 16 18:54:06 1996
From: rbk@ibeam.jf.intel.com (Bob Beck)
To: Arthur.Vanhoff@Eng.Sun.COM (Arthur van Hoff)
Date: Tue, 16 Jan 1996 14:14:52 -0800 (PST)
Cc: rbk@ibeam.jf.intel.com, java-interest@java.Eng.Sun.COM
In-Reply-To: <199601162150.NAA08079@jakarta.Eng.Sun.COM> from "Arthur van Hoff" at Jan 16, 96 01:50:00 pm
Arthur - thanks for the quick response. It doesn't work for me -
virtually identical code behaves differently between Beta1 and Beta2.
Are you using the same bits I am? Ie, Java Beta2 on NT?
- Bob
> > I have some simple client/server applications written in Java. I was working
> > on a new one and noticed that when the server closes its socket, the client
> > doesn't notice this! In Beta1, the client did notice (re-compiling code
> > that's identical except for beta2 required changes that don't effect this
> > issue, I think).
> >
> > For example, a simple server that just echoes its input back to the client
> > (until the client types "quit"), exercised with telnet: on Beta1 when the
> > client types "quit", the server closes its socket and telnet reports the
> > connection to the server went away. Compiled on beta2, it *doesn't* go
> > away... telnet think's it still attached, but the server thinks its closed
> > the socket (I've verified I *am* calling socket.close(), and the call
> > succeeds - no exception).
> >
> > Has anyone else seen this? It makes it kind of hard to know when the socket
> > will actually be closed... How else can the server ensure its connection to
> > the client is really gone (so the client doesn't hang) ??
>
> I've been doing the same thing and it works for me. I did notice that
> when you go through an http server (using URLConnection.getInputStream),
> the server usually fails to close the connection.
>
> Have fun,
>
> Arthur van Hoff
-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com