public void InvokeOneway(RemotingRequest request) { EnsureClientStatus(); request.Type = RemotingRequestType.Oneway; _clientSocket.QueueMessage(RemotingUtil.BuildRequestMessage(request)); }
public void InvokeWithCallback(RemotingRequest request) { EnsureClientStatus(); request.Type = RemotingRequestType.Callback; _clientSocket.QueueMessage(RemotingUtil.BuildRequestMessage(request)); }
public void InvokeOneway(RemotingRequest request) { EnsureClientStatus(); request.IsOneway = true; _tcpClient.SendAsync(RemotingUtil.BuildRequestMessage(request)); }
public void InvokeOneway(RemotingRequest request, int timeoutMillis) { EnsureClientStatus(); request.IsOneway = true; _tcpClient.SendMessage(RemotingUtil.BuildRequestMessage(request)); }
public Task <RemotingResponse> InvokeAsync(RemotingRequest request, int timeoutMillis = 5000) { EnsureClientStatus(); var taskCompletionSource = new TaskCompletionSource <RemotingResponse>(); var responseFuture = new ResponseFuture(request, timeoutMillis, taskCompletionSource); if (!_responseFutureDict.TryAdd(request.Sequence, responseFuture)) { throw new ResponseFutureAddFailedException(request.Sequence); } _tcpClient.SendAsync(RemotingUtil.BuildRequestMessage(request)); return(taskCompletionSource.Task); }