new($Name [, $Timeout [, $Type [, $Permissions ] ] )
Creates a named pipe if used in server context or a connection to the specified named pipe if used in client context. $Type can be consist of one value logically ORed from both tables: Pipe Types: PIPE_TYPE_MESSAGE Data will move across the pipe as a message of a specific size. Note that this mode must be used in order for a client or server to use the Transact() <http://www.roth.net/perl/pipe/#Transact#Transact> method. PIPE_TYPE_BYTE Data will move across the pipe as a stream of bytes. Use this type when transfering data that is not always predictable. This is the default state of a newly created pipe. Pipe Read Modes (how is data read from the pipe -- this state can be later changed with a call to State() <http://www.roth.net/perl/pipe/#State#State> ) PIPE_READMODE_MESSAGE Data is read from the pipe in descrete chunks of a particular size. Note that this mode must be used in order for a client or server to use the Transact() <http://www.roth.net/perl/pipe/#Transact#Transact> method. PIPE_READMODE_BYTE Data is read from the pipe as a stream of bytes. im a total newbie to using this module. in past, ive successfully written simple perl scripts that were able to send emails through a named pipe (one way only) to the sendmail program (in unix). but using this for a two-way send-receive situation with win32::Pipe is a more complicated thing. my client windows perl script is attempting to communicate with a win32 named pipe (created by another windows application - one that I do NOT have source code to). ive monitored the successful named pipe communication (using sysinternals 'filemon'), and I am able to see that other application creates the server side of the named pipe at a size of 297 bytes, and always sends and receives transmissions of that size. in reading the info provided for the 'new' method there is a section that indicates one may tell the client app to create a new named pipe instance specifying the 'type'. its not clear to me from these notes, the difference between, for example - PIPE_TYPE_MESSAGE and PIPE_READMODE_MESSAGE. I infer from this, that if they wanted to set a 'fixed data transmission' size - the server perl script would create the original instance of the named pipe using PIPE_TYPE_MESSAGE. and additional instances of this named pipe (eg, the client?) would use PIPE_READMODE_MESSAGE. my assumption here may be incorrect. since ive determined the 3rd party app I am trying to interface with uses a fixed size of 297, I assume that my client named pipe script should use PIPE_READMODE_MESSAGE. this much I think im following. but this is where I get lost; a. "$Type can be consist of one value logically ORed from both tables" I have no clue what this means, what a 'table' is. why one would want to, or need to 'or' values from these 'tables'. nor how one would 'or' the values. are these 'constants'? if so where are the actual values of these constants exposed for the user to see? b. if I edit 'pipe.pm' the end of the file says, "All named pipes are byte streams. There is currently no way to alter a pipe to be message based." not being an expert with all of this, does this statement seem to conflict with the ability to specify the PIPE_READMODE_MESSAGE and PIPE_TYPE_MESSAGE parameters above?
_______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs