2 // System.Runtime.Remoting.Channels.BinaryClientFormatterSink.cs
4 // Author: Rodrigo Moya (rodrigo@ximian.com)
5 // Dietmar Maurer (dietmar@ximian.com)
7 // 2002 (C) Copyright, Ximian, Inc.
10 using System.Collections;
12 using System.Runtime.Remoting.Messaging;
14 namespace System.Runtime.Remoting.Channels
16 public class BinaryClientFormatterSink : IClientFormatterSink,
17 IMessageSink, IClientChannelSink, IChannelSinkBase
19 private IClientChannelSink nextInChain;
21 public BinaryClientFormatterSink (IClientChannelSink nextSink)
23 nextInChain = nextSink;
26 public IClientChannelSink NextChannelSink
33 public IMessageSink NextSink
36 return (IMessageSink) nextInChain;
40 public IDictionary Properties
48 public IMessageCtrl AsyncProcessMessage (IMessage msg,
49 IMessageSink replySink)
51 throw new NotImplementedException ();
55 public void AsyncProcessRequest (IClientChannelSinkStack sinkStack,
57 ITransportHeaders headers,
60 throw new NotImplementedException ();
64 public void AsyncProcessResponse (IClientResponseChannelSinkStack sinkStack,
66 ITransportHeaders headers,
69 throw new NotImplementedException ();
72 public Stream GetRequestStream (IMessage msg,
73 ITransportHeaders headers)
78 public void ProcessMessage (IMessage msg,
79 ITransportHeaders requestHeaders,
81 out ITransportHeaders responseHeaders,
82 out Stream responseStream)
84 nextInChain.ProcessMessage (msg, requestHeaders, requestStream,
85 out responseHeaders, out responseStream);
89 public IMessage SyncProcessMessage (IMessage msg)
91 ITransportHeaders response_headers;
92 Stream response_stream;
94 // fixme: use nextInChain.GetRequestStream() ??
95 Stream out_stream = new MemoryStream ();
97 // fixme: serialize msg to the stream
99 ProcessMessage (msg, null, out_stream, out response_headers, out response_stream);
101 // fixme: deserialize response_stream
102 IMessage result = null;