[2748] in java-interest
Re: JDK: Socket write that never returns
daemon@ATHENA.MIT.EDU (Pavani Diwanji)
Thu Oct 12 16:15:13 1995
Date: Thu, 12 Oct 1995 10:53:33 -0700
From: pavani@scndprsn.eng.sun.com (Pavani Diwanji)
To: java-interest@java.Eng.Sun.COM
>
> > >
> > > Has anyone had a beta socket write throw an Exception of any kind
> > > for them?
> > >
In current JDK, there is a bug, where sometimes error from *write* gets
ignored, and hence the IO exception does not get thrown for example when one end
breaks the TCP connection. This bug has been fixed and will be available,
in the next JDK release.
One other thing to keep in mind is that if you are using PrintStreams, to
write to the Socket Connection i.e code like:
Socket s = new Socket("foo", 4357);
PrintStream out = new PrintStream(s.getOutputStream());
out.println("Hello world!");
you still won't get IO exception, as the PrintStream methods do not percollate the
IO exceptions out (i.e. semantics are so that PrintStreams catch IO exception and
keep on going).
Pavani.
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com