private GamMatrixAPI.ReplyResponse SendRequest(GamMatrixAPI.HandlerRequest request) { var msg = new GamMatrixAPI.CoreAPIMessageRequest { Type = GamMatrixAPI.CoreAPIMessageType.SingleRequest, ClassName = new List <string> { request.GetType().Name }, SerializedRequest = new List <string> { Encoding.UTF8.GetString(Serialize(request)) } }; return((GamMatrixAPI.ReplyResponse) Deserialize(typeof(GamMatrixAPI.ReplyResponse), Encoding.UTF8.GetBytes(Send(msg, _timeoutMs)))); }
public GamMatrixAPI.ReplyResponse SingleRequest(GamMatrixAPI.HandlerRequest request) { return(SendRequest(request)); }
public IAsyncResult BeginSingleRequest(GamMatrixAPI.HandlerRequest request, AsyncCallback callback, object asyncState) { AsyncSingleRequest caller = new AsyncSingleRequest(this.SingleRequest); return(caller.BeginInvoke(request, callback, new object[] { caller, asyncState })); }