[jcifs] readPacketType() / IO exception
Michael B Allen
mba2000 at ioplex.com
Wed Feb 23 09:41:43 GMT 2005
On Wed, 23 Feb 2005 01:05:42 -0800 (PST)
Ang Chang <ang_chng at yahoo.com> wrote:
> Regarding this issue with HP-UX, is this happening only for HP-UX systems?
> What about Solaris, AIX or Linux, are they having the same problem against
> the same server? We use jcifs in Linux under really heavy load and this
> poblem did not turn up.
I think it can happen with any host os or server. But it will only be
triggered if the socket buffers fill up which means you probably need
to be multiplexing a lot of I/O over the same transport.
> Michael, shouldn_t the following method in socketInputStream deal with
> this problem?if SmbTransport asks for the header (4 bytes) why less than
> four are returned? As far as I understand if we ask this method for 4
> bytes, the method won_t return till len bytes have been read.
>
>
>
> /* This method will not return until len bytes have been read
> * or the stream has been closed.
> */
>
> public synchronized int read( byte[] b, int off, int len ) throws
> IOException {
Yes, but no. The jcifs.netbios.SocketInputStream.java methods do not
return until all bytes have been read but I think readPacketType is
reading the underlying NetBIOS header *directly from the underlying
socket*. It needs to be modified to deal with shortcounts (I'm not 100%
on this though, I have to look at it closer ...).
Mike
--
IRC - where men are men, women are men, and the boys are FBI agents.
More information about the jcifs
mailing list