C# 클래스 tiesky.com.SharmIpc

Inter-process communication handler. IPC for .NET https://github.com/hhblaze/SharmIPC or http://sharmipc.tiesky.com
상속: IDisposable
파일 보기 프로젝트 열기: hhblaze/SharmIPC

공개 메소드들

메소드 설명
AsyncAnswerOnRemoteCall ( ulong msgId, byte[]>.Tuple res ) : void

In case if asyncRemoteCallHandler != null

Dispose ( ) : void

RemoteRequest ( byte args, byte[]>.Action callBack = null, int timeoutMs = 30000 ) : byte[]>.Tuple

RemoteRequestWithoutResponse ( byte args ) : bool

Just sends payload to remote partner without awaiting response from it.

SharmIpc ( string uniqueHandlerName, byte[]>.Action remoteCallHandler, long bufferCapacity = 50000, int maxQueueSizeInBytes = 20000000, System.Exception>.Action ExternalExceptionHandler = null ) : System

SharmIpc constructor

SharmIpc ( string uniqueHandlerName, byte[]>.Func remoteCallHandler, long bufferCapacity = 50000, int maxQueueSizeInBytes = 20000000, System.Exception>.Action ExternalExceptionHandler = null ) : System

SharmIpc constructor

비공개 메소드들

메소드 설명
InternalDataArrived ( eMsgType msgType, ulong msgId, byte bt ) : void

Any incoming data from remote partner is accumulated here

LogException ( string description, System ex ) : void

Internal exception logger

메소드 상세

AsyncAnswerOnRemoteCall() 공개 메소드

In case if asyncRemoteCallHandler != null
public AsyncAnswerOnRemoteCall ( ulong msgId, byte[]>.Tuple res ) : void
msgId ulong
res byte[]>.Tuple
리턴 void

Dispose() 공개 메소드

public Dispose ( ) : void
리턴 void

RemoteRequest() 공개 메소드

public RemoteRequest ( byte args, byte[]>.Action callBack = null, int timeoutMs = 30000 ) : byte[]>.Tuple
args byte payload which must be send to remote partner
callBack byte[]>.Action if specified then response for the request will be returned into callBack (async). Default is sync.
timeoutMs int Default 30 sec
리턴 byte[]>.Tuple

RemoteRequestWithoutResponse() 공개 메소드

Just sends payload to remote partner without awaiting response from it.
public RemoteRequestWithoutResponse ( byte args ) : bool
args byte payload
리턴 bool

SharmIpc() 공개 메소드

SharmIpc constructor
public SharmIpc ( string uniqueHandlerName, byte[]>.Action remoteCallHandler, long bufferCapacity = 50000, int maxQueueSizeInBytes = 20000000, System.Exception>.Action ExternalExceptionHandler = null ) : System
uniqueHandlerName string Must be unique in OS scope (can be PID [ID of the process] + other identifications)
remoteCallHandler byte[]>.Action Callback routine for the remote partner requests. AsyncAnswerOnRemoteCall must be used for answer
bufferCapacity long bigger buffer sends larger datablocks faster. Default value is 50000
maxQueueSizeInBytes int If remote partner is temporary not available, messages are accumulated in the sending buffer. This value sets the upper threshold of the buffer in bytes.
ExternalExceptionHandler System.Exception>.Action External exception handler can be supplied, will be returned Description from SharmIPC, like class.method name and handeled exception
리턴 System

SharmIpc() 공개 메소드

SharmIpc constructor
public SharmIpc ( string uniqueHandlerName, byte[]>.Func remoteCallHandler, long bufferCapacity = 50000, int maxQueueSizeInBytes = 20000000, System.Exception>.Action ExternalExceptionHandler = null ) : System
uniqueHandlerName string Must be unique in OS scope (can be PID [ID of the process] + other identifications)
remoteCallHandler byte[]>.Func Response routine for the remote partner requests
bufferCapacity long bigger buffer sends larger datablocks faster. Default value is 50000
maxQueueSizeInBytes int If remote partner is temporary not available, messages are accumulated in the sending buffer. This value sets the upper threshold of the buffer in bytes.
ExternalExceptionHandler System.Exception>.Action External exception handler can be supplied, will be returned Description from SharmIPC, like class.method name and handeled exception
리턴 System