C# 클래스 MsgPack.Rpc.Client.RpcClient

Entry point of MessagePack-RPC client.
상속: IDisposable
파일 보기 프로젝트 열기: yfakariya/msgpack-rpc-cli 1 사용 예제들

Private Properties

프로퍼티 타입 설명
EnsureConnected void
NextId int
OnTranportShutdownComplete void
VerifyIsNotDisposed void

공개 메소드들

메소드 설명
BeginCall ( string methodName, object arguments, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult

Calls specified remote method with specified argument asynchronously.

BeginNotify ( string methodName, object arguments, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult

Sends specified remote method with specified argument as notification message asynchronously.

Call ( string methodName ) : MessagePackObject

Calls specified remote method with specified argument and returns its result synchronously.

CallAsync ( string methodName, object arguments, object asyncState ) : Task

Calls specified remote method with specified argument asynchronously.

In .NET Framework 4.0, Silverlight 5, or Windows Phone 7.5, the exception will be thrown as AggregateException in continuation Task. But this is because of runtime limitation, so this behavior will change in the future. You can BeginCall and EndCall to get appropriate exception directly.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

EndCall ( IAsyncResult asyncResult ) : MessagePackObject

Finishes asynchronous method invocation and returns its result.

You must call this method to clean up internal bookkeeping information and handles communication error even if the remote method returns void.

EndNotify ( IAsyncResult asyncResult ) : void

Finishes asynchronous method invocation.

You must call this method to clean up internal bookkeeping information and handles communication error.

Notify ( string methodName ) : void

Sends specified remote method with specified argument as notification message synchronously.

NotifyAsync ( string methodName, object arguments, object asyncState ) : Task

Sends specified remote method with specified argument as notification message asynchronously.

In .NET Framework 4.0, Silverlight 5, or Windows Phone 7.5, the exception will be thrown as AggregateException in continuation Task. But this is because of runtime limitation, so this behavior will change in the future. You can BeginNotify and EndNotify to get appropriate exception directly.

RpcClient ( EndPoint targetEndPoint ) : System

Initializes a new instance of the RpcClient class.

RpcClient ( EndPoint targetEndPoint, MsgPack.Rpc.Client.RpcClientConfiguration configuration ) : System

Initializes a new instance of the RpcClient class.

RpcClient ( EndPoint targetEndPoint, MsgPack.Rpc.Client.RpcClientConfiguration configuration, MsgPack.Serialization.SerializationContext serializationContext ) : System

Initializes a new instance of the RpcClient class.

RpcClient ( EndPoint targetEndPoint, MsgPack.Serialization.SerializationContext serializationContext ) : System

Initializes a new instance of the RpcClient class.

Shutdown ( ) : void

Initiates shutdown of current connection and wait to complete it.

ShutdownAsync ( ) : Task

Initiates shutdown of current connection.

비공개 메소드들

메소드 설명
EnsureConnected ( ) : void
NextId ( ) : int
OnTranportShutdownComplete ( object sender, EventArgs e ) : void
VerifyIsNotDisposed ( ) : void

메소드 상세

BeginCall() 공개 메소드

Calls specified remote method with specified argument asynchronously.
/// is null. /// /// is not valid. ///
public BeginCall ( string methodName, object arguments, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
methodName string /// The name of target method. ///
arguments object /// Argument to be passed to the server. /// All values must be able to be serialized with MessagePack serializer. ///
asyncCallback AsyncCallback /// The callback method invoked when the notification is sent or the reponse is received. /// This value can be null. /// Usually this callback get the result of invocation via . ///
asyncState object /// User supplied state object which can be gotten via in the callback. /// This value can be null. ///
리턴 IAsyncResult

BeginNotify() 공개 메소드

Sends specified remote method with specified argument as notification message asynchronously.
/// is null. /// /// is not valid. ///
public BeginNotify ( string methodName, object arguments, AsyncCallback asyncCallback, object asyncState ) : IAsyncResult
methodName string /// The name of target method. ///
arguments object /// Argument to be passed to the server. /// All values must be able to be serialized with MessagePack serializer. ///
asyncCallback AsyncCallback /// The callback method invoked when the notification is sent or the reponse is received. /// This value can be null. /// Usually this callback get the result of invocation via . ///
asyncState object /// User supplied state object which can be gotten via in the callback. /// This value can be null. ///
리턴 IAsyncResult

Call() 공개 메소드

Calls specified remote method with specified argument and returns its result synchronously.
/// is null. /// /// is not valid. /// /// Failed to execute specified remote method. ///
public Call ( string methodName ) : MessagePackObject
methodName string /// The name of target method. ///
리턴 MessagePackObject

CallAsync() 공개 메소드

Calls specified remote method with specified argument asynchronously.
In .NET Framework 4.0, Silverlight 5, or Windows Phone 7.5, the exception will be thrown as AggregateException in continuation Task. But this is because of runtime limitation, so this behavior will change in the future. You can BeginCall and EndCall to get appropriate exception directly.
/// is null. /// /// is not valid. ///
public CallAsync ( string methodName, object arguments, object asyncState ) : Task
methodName string /// The name of target method. ///
arguments object /// Argument to be passed to the server. /// All values must be able to be serialized with MessagePack serializer. ///
asyncState object /// User supplied state object to be set as . ///
리턴 Task

Dispose() 공개 메소드

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
리턴 void

EndCall() 공개 메소드

Finishes asynchronous method invocation and returns its result.
You must call this method to clean up internal bookkeeping information and handles communication error even if the remote method returns void.
/// is null. /// /// is not valid type. /// /// is returned from other instance, /// or its state is not valid. /// /// Failed to execute specified remote method. ///
public EndCall ( IAsyncResult asyncResult ) : MessagePackObject
asyncResult IAsyncResult /// returned from . ///
리턴 MessagePackObject

EndNotify() 공개 메소드

Finishes asynchronous method invocation.
You must call this method to clean up internal bookkeeping information and handles communication error.
/// is null. /// /// is not valid type. /// /// is returned from other instance, /// or its state is not valid. /// /// Failed to execute specified remote method. ///
public EndNotify ( IAsyncResult asyncResult ) : void
asyncResult IAsyncResult /// returned from . ///
리턴 void

Notify() 공개 메소드

Sends specified remote method with specified argument as notification message synchronously.
/// is null. /// /// is not valid. /// /// Failed to send notification message. ///
public Notify ( string methodName ) : void
methodName string /// The name of target method. ///
리턴 void

NotifyAsync() 공개 메소드

Sends specified remote method with specified argument as notification message asynchronously.
In .NET Framework 4.0, Silverlight 5, or Windows Phone 7.5, the exception will be thrown as AggregateException in continuation Task. But this is because of runtime limitation, so this behavior will change in the future. You can BeginNotify and EndNotify to get appropriate exception directly.
/// is null. /// /// is not valid. ///
public NotifyAsync ( string methodName, object arguments, object asyncState ) : Task
methodName string /// The name of target method. ///
arguments object /// Argument to be passed to the server. /// All values must be able to be serialized with MessagePack serializer. ///
asyncState object /// User supplied state object to be set as . ///
리턴 Task

RpcClient() 공개 메소드

Initializes a new instance of the RpcClient class.
/// is null. ///
public RpcClient ( EndPoint targetEndPoint ) : System
targetEndPoint System.Net.EndPoint /// for the target. ///
리턴 System

RpcClient() 공개 메소드

Initializes a new instance of the RpcClient class.
/// is null. ///
public RpcClient ( EndPoint targetEndPoint, MsgPack.Rpc.Client.RpcClientConfiguration configuration ) : System
targetEndPoint System.Net.EndPoint /// for the target. ///
configuration MsgPack.Rpc.Client.RpcClientConfiguration /// A which contains protocol information etc. ///
리턴 System

RpcClient() 공개 메소드

Initializes a new instance of the RpcClient class.
/// is null. ///
public RpcClient ( EndPoint targetEndPoint, MsgPack.Rpc.Client.RpcClientConfiguration configuration, MsgPack.Serialization.SerializationContext serializationContext ) : System
targetEndPoint System.Net.EndPoint /// for the target. ///
configuration MsgPack.Rpc.Client.RpcClientConfiguration /// A which contains protocol information etc. ///
serializationContext MsgPack.Serialization.SerializationContext /// A to hold serializers. ///
리턴 System

RpcClient() 공개 메소드

Initializes a new instance of the RpcClient class.
/// is null. ///
public RpcClient ( EndPoint targetEndPoint, MsgPack.Serialization.SerializationContext serializationContext ) : System
targetEndPoint System.Net.EndPoint /// for the target. ///
serializationContext MsgPack.Serialization.SerializationContext /// A to hold serializers. ///
리턴 System

Shutdown() 공개 메소드

Initiates shutdown of current connection and wait to complete it.
public Shutdown ( ) : void
리턴 void

ShutdownAsync() 공개 메소드

Initiates shutdown of current connection.
public ShutdownAsync ( ) : Task
리턴 Task