Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Apr 2000 20:42:46 -0400
From:      Taso Lyristis <taso@lyrisoft.com>
To:        freebsd-java@freebsd.org
Subject:   [Fwd: Socket bug and workaround example for FreeBSD JDK 1.2.2]
Message-ID:  <39039886.9FDDD98E@lyrisoft.com>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
 
[-- Attachment #2 --]
X-Mozilla-Status2: 00000000
Message-ID: <3903983F.45AE1A85@lyrisoft.com>
Date: Sun, 23 Apr 2000 20:41:35 -0400
From: Taso Lyristis <taso@lyrisoft.com>
X-Mailer: Mozilla 4.7 [en] (X11; U; Linux 2.2.13 i686)
X-Accept-Language: en
MIME-Version: 1.0
To: Nate Williams <nate@yogotech.com>
Subject: Re: Socket bug and workaround example for FreeBSD JDK 1.2.2
References: <39037F2B.8E010E21@lyrisoft.com> <200004240036.SAA09319@nomad.yogotech.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Nate Williams wrote:
> 
> > The quick description of this bug is the following:  When implementing a
> > TCP/IP server, the native method java.net.SocketInputStream.socketRead()
> > throws a SocketException: Resource temporarily unavailable instead of
> > blocking until data becomes available.  This breaks any Java code that
> > depends on a blocking read from a socket's input stream.
> 
> Can you give more detailed instructions on how to reproduce the bug?
> Otherwise, I can assume that it works, since if I run the program no
> errors are produced.
> 
> Nate

Try telnetting to the port that the server listens on.
$ java Test1 2000

Then, in another window, 
$ telnet localhost 2000

As soon as the connection is establish, you'll see the exception in the
console where Test1 is running.

Taso

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39039886.9FDDD98E>