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
파일 보기 프로젝트 열기: rsdn/janus

보호된 프로퍼티들

프로퍼티 타입 설명
_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