예제 #1
0
        public Task WriteAsync(TResponse message)
        {
            var taskSource = new AsyncCompletionTaskSource <object>();

            call.StartSendMessage(message, GetWriteFlags(), taskSource.CompletionDelegate);
            return(taskSource.Task);
        }
예제 #2
0
        public void OnNext(TResponse value)
        {
            var taskSource = new AsyncCompletionTaskSource();

            call.StartSendMessage(value, taskSource.CompletionDelegate);
            // TODO: how bad is the Wait here?
            taskSource.Task.Wait();
        }