[jcifs] Problem reading multiple writes from named pipe

Michael B.Allen Michael_B_Allen at ml.com
Thu Apr 17 11:22:11 EST 2003

On Tue, 15 Apr 2003 15:15:28 -0400
"Michael B.Allen" <miallen at ioplex.com> wrote:

> > > >pipe_project \\.\pipe\foo /M 0x80000003 /P 0x6
> > > 
> > 	I don't think you can do this Eric. Before I believe I mentioned
> > 	PIPE_TYPE_CALL would not work with separate write. The
> > 	above flags would create a transact named pipe. I'm surprised
> > 	this server works with PipeTalk. If you want to use
> > 	must issue your message in one buffer. If you want to use
> Actually, on second thought, I believe PIPE_TYPE_TRANSACT should be able
> to receive from multiple writes. PIPE_TYPE_CALL definately cannot. I'll
> look closer at this and get back to you. In the meantime, if it doesn't
> matter to you, you can use the regular file IO style pipe.

No. My origial suspicion was correct. It does not appear that you can
write twice on the server end of a Transact Named Pipe. The PipeTalk
program unmodified creates a File IO style named pipe which is incorrect
with the options you provided to createnp.exe. If you modify PipeTalk
to include the '| PIPE_TYPE_TRANSACT' flag it does not generate the
234 Exception and correctly performs the transact named pipe operation
(as observed on the wire) but the server generates:

  C:\Temp>pipe_project \\.\pipe\foo /M 0x80000003 /P 0x6
  Attempt Connect.
  Pipe connection successful.
  Start Read.
  bytesRead: 66
  read: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh
  length written
  bytesWritten: 66
  errorCode: 109
  Success: operation performed successfully

Error 109 is 'The pipe has been ended'.


More information about the jcifs mailing list