[jcifs] Batching command in CIFS
Cellina Lin
cellina at gmail.com
Tue Jan 25 04:26:30 GMT 2005
Thanks . But if the public API is not sufficient and I have to revise
the internal API, why is there the setting of batching comamnd in
client properties......
On Fri, 21 Jan 2005 03:03:31 -0500, Michael B Allen <mba2000 at ioplex.com> wrote:
> Please send all messages through the jcifs mailing list.
>
> On Fri, 21 Jan 2005 14:10:59 +0800
> Cellina Lin <cellina at gmail.com> wrote:
> > Yes, I am aware of the risk. My intention is to test the ability of
> > CIFS server in dealing with batched commands.
> >
> > I am also aware of the fact that batching is possible only if it is
> > sent in conjunction with another specified command. You can see in the
> > attached sniffered file, the ReadAndX command is following
> > NTCreateAndX command . ( I copied a file from CIFS server to local
> > disk to make this happen.) However, they are not batched together.
>
> No, you don't get it. The public API isn't sufficient to trigger batching
> (actually it might but not in a very controllable way). You will have to
> do something like:
>
> package jcifs.smb;
>
> public class BatchingTests extends SmbFile {
>
> public void createAndReadAndClose() {
> SmbComClose req3 = new SmbComClose(...);
> SmbComCloseResponse resp3 = new SmbComCloseResponse(...);
>
> SmbComReadAndX req2 = new SmbComRead(...., req3);
> SmbComReadAndXResponse resp2 = new SmbComReadAnxDRespons(...);
>
> SmbComNTCreateAndX req1 = new SmbComNTCreateAndX(..., req2);
> SmbComNTCreateAndX resp1 = new SmbComNTCreateAndXResponse(...);
>
> send(req1, resp1);
> }
> }
>
> This is highly trivialized obviously. You would have to look at the code
> and get an idea for how the internal API is used.
>
> Mike
>
> --
> Greedo shoots first? Not in my Star Wars.
>
More information about the jcifs
mailing list