C# Class EpLibrary.cs.IpcClient

Inheritance: ThreadEx, IpcClientInterface, IDisposable
显示文件 Open project: juhgiyo/EpLibrary.cs Class Usage Examples

Private Properties

Property Type Description
Dispose void
OnReadComplete void
OnWriteComplete void
startReceive void

Public Methods

Method Description
Connect ( EpLibrary.cs.IpcClientOps ops, int waitTimeInMilliSec ) : void

Connect to the server

Disconnect ( ) : void

Stop the server

Dispose ( ) : void
GetFullPipeName ( ) : string

Get the pipe name of server

GetMaxReadDataByteSize ( ) : int

Get the maximum read data byte size

GetMaxWriteDataByteSize ( ) : int

Get the maximum write data byte size

IpcClient ( ) : System

Default Constructor

IsConnected ( ) : bool

Check if the client is connected to server

Write ( byte data, int offset, int dataByteSize ) : void

Write data to the pipe

Protected Methods

Method Description
execute ( ) : void

Actual connect function

Private Methods

Method Description
Dispose ( bool isDisposing ) : void
OnReadComplete ( IAsyncResult result ) : void

Handles when Read is completed

OnWriteComplete ( IAsyncResult result ) : void

Handles when Write is completed

startReceive ( ) : void

start receiving from pipe

Method Details

Connect() public method

Connect to the server
public Connect ( EpLibrary.cs.IpcClientOps ops, int waitTimeInMilliSec ) : void
ops EpLibrary.cs.IpcClientOps the client options
waitTimeInMilliSec int the wait time for connection in milli-second.
return void

Disconnect() public method

Stop the server
public Disconnect ( ) : void
return void

Dispose() public method

public Dispose ( ) : void
return void

GetFullPipeName() public method

Get the pipe name of server
public GetFullPipeName ( ) : string
return string

GetMaxReadDataByteSize() public method

Get the maximum read data byte size
public GetMaxReadDataByteSize ( ) : int
return int

GetMaxWriteDataByteSize() public method

Get the maximum write data byte size
public GetMaxWriteDataByteSize ( ) : int
return int

IpcClient() public method

Default Constructor
public IpcClient ( ) : System
return System

IsConnected() public method

Check if the client is connected to server
public IsConnected ( ) : bool
return bool

Write() public method

Write data to the pipe
public Write ( byte data, int offset, int dataByteSize ) : void
data byte the data to write
offset int offset to start write from given data
dataByteSize int byte size of the data
return void

execute() protected method

Actual connect function
protected execute ( ) : void
return void