[jcifs] Re: Large File upload performance
Christopher R. Hertel
crh at ubiqx.mn.org
Sun Sep 21 01:48:36 EST 2003
Michael B Allen wrote:
> BTW, in case anyone's wondering *why* we copy when writing and not on
> reading; the NbtSocket API write( byte b, int offset, int len ) method
> accepts a byte array (b) that will be prefixed with the session service
> NetBIOS header. You cannot write the 4 byte header and then the buffer
> because the server could (and probably would) receive each in separate
> packets. A well behaved server should accept this but I seriously doubt
> they do.
...but you're right, they should. It should be read as a stream on the
receiving end, and this type of problem should be handled because TCP
messages can be fragmented in transit, with chunks lost here and there.
Also, it is possible to send SMBs that are larger than the (MTU-overhead)
size, and these will certainly be fragmented. So, this may be worth a try.
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/ -)----- Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/ -)----- ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/ -)----- crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/ -)----- crh at ubiqx.org
More information about the jcifs