<P>To use this extension, follow these basic steps. First, you need to
'use' the pipe extension:</P>
<PRE>
use Win32::Pipe;</PRE>
<P>Then you need to create a server side of a named pipe:</P>
<PRE>
$Pipe = new Win32::Pipe("My Pipe Name");</PRE>
<P>or if you are going to connect to pipe that has already been created:</P>
<PRE>
$Pipe = new Win32::Pipe("\\\\server\\pipe\\My Pipe Name");</PRE>
<PRE>
NOTE: The "\\\\server\\pipe\\" is necessary when connecting
to an existing pipe! If you are accessing the same
machine you could use "\\\\.\\pipe\\" but either way
works fine.</PRE>
<P>You should check to see if <CODE>$Pipe</CODE> is indeed defined otherwise there
has been an error.</P>
<P>Whichever end is the server, it must now wait for a connection...</P>
<PRE>
$Result = $Pipe->Connect();</PRE>
<PRE>
NOTE: The client end does not do this! When the client creates
the pipe it has already connected!</PRE>
<P>Now you can read and write data from either end of the pipe:</P>
<PRE>
$Data = $Pipe->Read();</PRE>
<PRE>
$Result = $Pipe->Write("Howdy! This is cool!");</PRE>
<P>When the server is finished it must disconnect:</P>
<PRE>
$Pipe->Disconnect();</PRE>
<P>Now the server could <A HREF="#item_Connect"><CODE>Connect</CODE></A> again (and wait for another client) or
it could destroy the named pipe...</P>
<PRE>
$Data->Close();</PRE>
<P>The client should <A HREF="#item_Close"><CODE>Close</CODE></A> in order to properly end the session.</P>
<P>
<HR>
<H1><A NAME="description">DESCRIPTION</A></H1>
<P>
<H2><A NAME="general use">General Use</A></H2>
<P>This extension gives Win32 Perl the ability to use Named Pipes. Why?
Well considering that Win32 Perl does not (yet) have the ability to
<A HREF="../../../lib/Pod/perlfunc.html#item_fork"><CODE>fork</CODE></A> I could not see what good the <A HREF="../../../lib/Pod/perlfunc.html#item_pipe"><CODE>pipe(X,Y)</CODE></A> was. Besides, where
I am as an admin I must have several perl daemons running on several
NT Servers. It dawned on me one day that if I could pipe all these
daemons' output to my workstation (across the net) then it would be
much easier to monitor. This was the impetus for an extension using
Named Pipes. I think that it is kinda cool. :)</P>
<P>
<H2><A NAME="benefits">Benefits</A></H2>
<P>And what are the benefits of this module?</P>
<UL>
<LI>
You may create as many named pipes as you want (uh, well, as many as
your resources will allow).
<P></P>
<LI>
Currently there is a limit of 256 instances of a named pipe (once a
pipe is created you can have 256 client/server connections to that
name).
<P></P>
<LI>
The default buffer size is 512 bytes; this can be altered by the