Opc.Ua.Bindings.TcpClientChannel.EndSendRequest C# (CSharp) Method

EndSendRequest() public method

Returns the response to a previously sent request.
public EndSendRequest ( IAsyncResult result ) : IServiceResponse
result IAsyncResult
return IServiceResponse
        public IServiceResponse EndSendRequest(IAsyncResult result)
        {
            WriteOperation operation = result as WriteOperation;

            if (operation == null)
            {
                throw new ArgumentNullException("result");
            }

            try
            {
                operation.End(Int32.MaxValue);
            }
            finally
            {
                OperationCompleted(operation);
            }

            return operation.MessageBody as IServiceResponse;
        }
        #endregion