public void AsyncProcessResponse( IClientResponseChannelSinkStack sinkStack, object state, ITransportHeaders headers, Stream stream) { Exception ex = GetExceptionIfNecessary(ref headers, ref stream); if (ex != null) { sinkStack.DispatchException(ex); } else { sinkStack.AsyncProcessResponse(headers, stream); } }
public void AsyncProcessResponse(IClientResponseChannelSinkStack sinkStack, object state, ITransportHeaders headers, Stream stream) { // client side formatter is the last sink in the chain accessing the serialised message, therefore this method is called on the return path AsyncProcessingData asyncData = (AsyncProcessingData)state; // retrieve the request msg stored on the channelSinkStack IMessage requestMsg = asyncData.RequestMsg; try { IMessage responseMsg; try { GiopClientConnectionDesc conDesc = (GiopClientConnectionDesc)asyncData.ConDesc; responseMsg = DeserialiseResponse(stream, headers, requestMsg, conDesc); } finally { m_conManager.RequestOnConnectionCompleted(requestMsg); // release the connection, because this interaction is complete } sinkStack.DispatchReplyMessage(responseMsg); // dispatch the result message to the message handling reply sink chain } catch (Exception e) { sinkStack.DispatchException(e); // dispatch the exception to the message handling reply sink chain } }
public void AsyncProcessResponse(IClientResponseChannelSinkStack sinkStack, object state, ITransportHeaders headers, Stream stream) { // client side formatter is the last sink in the chain accessing the serialised message, therefore this method is called on the return path AsyncProcessingData asyncData = (AsyncProcessingData) state; // retrieve the request msg stored on the channelSinkStack IMessage requestMsg = asyncData.RequestMsg; try { IMessage responseMsg; try { GiopClientConnectionDesc conDesc = (GiopClientConnectionDesc)asyncData.ConDesc; responseMsg = DeserialiseResponse(stream, headers, requestMsg, conDesc); } finally { m_conManager.RequestOnConnectionCompleted(requestMsg); // release the connection, because this interaction is complete } sinkStack.DispatchReplyMessage(responseMsg); // dispatch the result message to the message handling reply sink chain } catch (Exception e) { sinkStack.DispatchException(e); // dispatch the exception to the message handling reply sink chain } }