PipeStream
Class
Definition
Exposes a Stream object around a pipe, which supports both anonymous and named pipes.
public abstract class PipeStream : System.IO.Stream
- Inheritance
- Derived
Inherited Members
System.IO.Stream
System.MarshalByRefObject
System.Object
Remarks
The PipeStream class provides the base class for named and anonymous pipes operations in the .NET Framework. Use the NamedPipeServerStream and NamedPipeClientStream classes for named pipe operations. Use the AnonymousPipeServerStream and AnonymousPipeClientStream classes for anonymous pipe operations.
For more information about pipes, see Pipes. For an example of anonymous pipes, see How to: Use Anonymous Pipes for Local Interprocess Communication. For an example of named pipes, see How to: Use Named Pipes for Network Interprocess Communication.
Constructors
| PipeStream(PipeDirection, Int32) |
Initializes a new instance of the PipeStream class using the specified PipeDirection value and buffer size. |
| PipeStream(PipeDirection, PipeTransmissionMode, Int32) |
Initializes a new instance of the PipeStream class using the specified PipeDirection, PipeTransmissionMode, and buffer size. |
Properties
| CanRead |
Gets a value indicating whether the current stream supports read operations. |
| CanSeek |
Gets a value indicating whether the current stream supports seek operations. |
| CanWrite |
Gets a value indicating whether the current stream supports write operations. |
| InBufferSize |
Gets the size, in bytes, of the inbound buffer for a pipe. |
| IsAsync |
Gets a value indicating whether a PipeStream object was opened asynchronously or synchronously. |
| IsConnected |
Gets or sets a value indicating whether a PipeStream object is connected. |
| IsHandleExposed |
Gets a value indicating whether a handle to a PipeStream object is exposed. |
| IsMessageComplete |
Gets a value indicating whether there is more data in the message returned from the most recent read operation. |
| Length |
Gets the length of a stream, in bytes. |
| OutBufferSize |
Gets the size, in bytes, of the outbound buffer for a pipe. |
| Position |
Gets or sets the current position of the current stream. |
| ReadMode |
Gets or sets the reading mode for a PipeStream object. |
| SafePipeHandle |
Gets the safe handle for the local end of the pipe that the current PipeStream object encapsulates. |
| TransmissionMode |
Gets the pipe transmission mode supported by the current pipe. |
Methods
| BeginRead(Byte[], Int32, Int32, AsyncCallback, Object) |
Begins an asynchronous read operation. |
| BeginWrite(Byte[], Int32, Int32, AsyncCallback, Object) |
Begins an asynchronous write operation. |
| CheckPipePropertyOperations() |
Verifies that the pipe is in a proper state for getting or setting properties. |
| CheckReadOperations() |
Verifies that the pipe is in a connected state for read operations. |
| CheckWriteOperations() |
Verifies that the pipe is in a connected state for write operations. |
| Dispose(Boolean) |
Releases the unmanaged resources used by the PipeStream class and optionally releases the managed resources. |
| EndRead(IAsyncResult) |
Ends a pending asynchronous read request. |
| EndWrite(IAsyncResult) |
Ends a pending asynchronous write request. |
| Flush() |
Clears the buffer for the current stream and causes any buffered data to be written to the underlying device. |
| GetAccessControl() |
Gets a PipeSecurity object that encapsulates the access control list (ACL) entries for the pipe described by the current PipeStream object. |
| InitializeHandle(SafePipeHandle, Boolean, Boolean) |
Initializes a PipeStream object from the specified SafePipeHandle object. |
| Read(Byte[], Int32, Int32) |
Reads a block of bytes from a stream and writes the data to a specified buffer. |
| ReadAsync(Byte[], Int32, Int32, CancellationToken) | |
| ReadByte() |
Reads a byte from a pipe. |
| Seek(Int64, SeekOrigin) |
Sets the current position of the current stream to the specified value. |
| SetAccessControl(PipeSecurity) |
Applies the access control list (ACL) entries specified by a PipeSecurity object to the pipe specified by the current PipeStream object. |
| SetLength(Int64) |
Sets the length of the current stream to the specified value. |
| WaitForPipeDrain() |
Waits for the other end of the pipe to read all sent bytes. |
| Write(Byte[], Int32, Int32) |
Writes a block of bytes to the current stream using data from a buffer. |
| WriteAsync(Byte[], Int32, Int32, CancellationToken) | |
| WriteByte(Byte) |
Writes a byte to the current stream. |
Extension Methods
| GetAccessControl(PipeStream) | |
| SetAccessControl(PipeStream, PipeSecurity) |