public void ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, out ITransportHeaders responseHeaders, out Stream responseStream) { InternalRemotingServices.RemotingTrace("IpcClientChannel::ProcessMessage"); IpcPort port = null; // the call to SendRequest can block a func eval, so we want to notify the debugger that we're // about to call a blocking operation. System.Diagnostics.Debugger.NotifyOfCrossThreadDependency(); // The authentication config entries are only valid if secure is true if (authSet && ! _channel.IsSecured) throw new RemotingException(CoreChannel.GetResourceString( "Remoting_Ipc_AuthenticationConfig")); port = portCache.GetConnection(_portName, _channel.IsSecured, _tokenImpersonationLevel, _timeout); IMethodCallMessage mcm = (IMethodCallMessage)msg; int requestLength = (int)requestStream.Length; Stream ipcStream = new PipeStream(port); IpcClientHandler handler = new IpcClientHandler(port, ipcStream, this); handler.SendRequest(msg, requestHeaders, requestStream); responseHeaders = handler.ReadHeaders(); responseStream = handler.GetResponseStream(); // The client port will be returned to the cache // when the response stream is closed. } // ProcessMessage
public void ProcessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream, out ITransportHeaders responseHeaders, out Stream responseStream) { IpcPort port = null; Debugger.NotifyOfCrossThreadDependency(); if (this.authSet && !this._channel.IsSecured) { throw new RemotingException(CoreChannel.GetResourceString("Remoting_Ipc_AuthenticationConfig")); } port = this.portCache.GetConnection(this._portName, this._channel.IsSecured, this._tokenImpersonationLevel, this._timeout); IMethodCallMessage message1 = (IMethodCallMessage) msg; long length = requestStream.Length; Stream stream = new PipeStream(port); IpcClientHandler handler = new IpcClientHandler(port, stream, this); handler.SendRequest(msg, requestHeaders, requestStream); responseHeaders = handler.ReadHeaders(); responseStream = handler.GetResponseStream(); }