[jcifs] Problem reading multiple writes from named pipe
ericsword at grouplogic.com
Fri Apr 11 23:58:43 EST 2003
> -----Original Message-----
> From: Michael B.Allen [mailto:Michael_B_Allen at ml.com]
> Sent: Thursday, April 10, 2003 11:12 PM
> To: Eric Sword
> Cc: jcifs at lists.samba.org
> Subject: Re: [jcifs] Problem reading multiple writes from named pipe
> > [snip - read in length and then message using two
> ReadFile calls]
> > [snip - length of read message is put into length variable]
> > //write length
> > returnCode = WriteFile(outFile, &length, sizeof(length),
> > &bytesWritten, NULL);
> This is not portable. Your Java program will break on a
> BigEndian machine like a Sparc.
Actually, all Java is BigEndian, even on Windows. I have
SwapperDataInputStream and SwapperDataOutputStream classes that handle
byte ordering for me. I've been working with cross platform networking
apps for about 10 years now, so dealing with the hassles of Intel chips
is second nature. ;-)
> Doesn't matter. JCIFS should behave the same on any platform.
> But the behavior might be different depending on which
> version of Windows you use.
XP is what I've seen it on so far. I will see if I can easily try on
> Fraid not. I tried 2 write on the createnp side like I
> originally had and also tried modifying PipeTalk to write
> twice. In all cases I never received the 234 error. Can you
> send me a modified createnp.c and/or modified PipeTalk.java
> with instructions on how to run each program to reproduce
> this problem?
No problem. Rather than flooding the group, I'll send the sources to
you offline in a bit. Thanks for your help!
More information about the jcifs