Book HomeJava and XSLTSearch this book

22.13. Win32::Pipe

This module gives Win32 Perl the ability to use named pipes. Under Windows NT, named pipes are used for processes to communicate with one another, and are not limited to the local machine.

Named pipes are created with new, which makes a new Win32::Pipe object and returns true on success. new has the following syntax:

my $named_pipe = Win32::Pipe->new($pipe_name);

22.13.1. Win32::Pipe Methods

The following methods are provided for objects of created by Win32::Pipe.

BufferSize

$named_pipe->BufferSize(  )

Returns the size of the instance of the buffer of the named pipe.

Close

$named_pipe->Close

Closes the named pipe.

Connect

$named_pipe->Connect

Tells the named pipe to create an instance of the named pipe and wait until a client connects. Returns true on success, false on failure.

Disconnect

$named_pipe->Disconnect

Disconnects (and destroys) the instance of the named pipe from the client. Returns true on success, false on failure.

Error

$named_pipe->Error

Returns the last error messages pertaining to the named pipe, if used in context to the package. Returns a list containing ERROR_NUMBER and ERROR_TEXT.

Read

$named_pipe->Read

Reads from the named pipe. Returns data read from the pipe on success, undef on failure.

ResizeBuffer

$named_pipe->ResizeBuffer(SIZE)

Sets the size of the buffer of the instance of the named pipe to SIZE. Returns the size of the buffer on success, false on failure.

Write

$named_pipe->Write(DATA)

Writes DATA to the named pipe. Returns true on success, false on failure.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.