C# Класс Rsdn.Janus.Framework.Ipc.APipeConnection

An abstract class, which defines the methods for creating named pipes connections, reading and writing data.
This class used for client and server applications respectively, which communicate using NamesPipes.
Наследование: IInterProcessConnection
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
_disposed bool
_handle PipeHandle
_maxReadBytes int
_name string

Открытые методы

Метод Описание
CheckIfDisposed ( ) : void

Checks if the pipe connection is disposed.

This check is done before performing any pipe operations.

Close ( ) : void

Closes the pipe connection.

Connect ( ) : void

Connects a pipe connection.

Dispose ( ) : void

Disposes a pipe connection by closing the underlying native handle.

GetState ( ) : InterProcessConnectionState

object.

Read ( ) : string

Reads a message from the pipe connection and converts it to a string using the UTF8 encoding.

ReadBytes ( ) : byte[]

Reads a message from the pipe connection.

Write ( string text ) : void

Writes a string to the pipe connection/

WriteBytes ( byte bytes ) : void

Writes an array of bytes to the pipe connection.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Disposes a pipe connection by closing the underlying native handle.

Описание методов

CheckIfDisposed() публичный Метод

Checks if the pipe connection is disposed.
This check is done before performing any pipe operations.
public CheckIfDisposed ( ) : void
Результат void

Close() публичный абстрактный Метод

Closes the pipe connection.
public abstract Close ( ) : void
Результат void

Connect() публичный абстрактный Метод

Connects a pipe connection.
public abstract Connect ( ) : void
Результат void

Dispose() публичный Метод

Disposes a pipe connection by closing the underlying native handle.
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

Disposes a pipe connection by closing the underlying native handle.
protected Dispose ( bool disposing ) : void
disposing bool A boolean indicating how the method is called.
Результат void

GetState() публичный Метод

object.
public GetState ( ) : InterProcessConnectionState
Результат InterProcessConnectionState

Read() публичный Метод

Reads a message from the pipe connection and converts it to a string using the UTF8 encoding.
public Read ( ) : string
Результат string

ReadBytes() публичный Метод

Reads a message from the pipe connection.
public ReadBytes ( ) : byte[]
Результат byte[]

Write() публичный Метод

Writes a string to the pipe connection/
public Write ( string text ) : void
text string The text to write.
Результат void

WriteBytes() публичный Метод

Writes an array of bytes to the pipe connection.
public WriteBytes ( byte bytes ) : void
bytes byte The bytes array.
Результат void

Описание свойств

_disposed защищенное свойство

Boolean field used by the IDisposable implementation.
protected bool _disposed
Результат bool

_handle защищенное свойство

A object containing the native pipe handle.
protected PipeHandle,Rsdn.Janus.Framework.Ipc _handle
Результат PipeHandle

_maxReadBytes защищенное свойство

The maximum bytes that will be read from the pipe connection.
This field could be used if the maximum length of the client message is known and we want to implement some security, which prevents the server from reading larger messages.
protected int _maxReadBytes
Результат int

_name защищенное свойство

The name of the named pipe.
This name is used for creating a server pipe and connecting client ones to it.
protected string _name
Результат string