public class BinaryServerFormatterSink : IServerChannelSink, IChannelSinkBase
|
ctor #1 | Initializes a new instance of the BinaryServerFormatterSink class. |
NextChannelSink | Read-only Gets the next IServerChannelSink in the sink chain. |
Properties | Read-only Gets an IDictionary of properties for the current channel sink. |
AsyncProcessResponse | Requests processing of the response from a method call sent asynchronously. |
Equals (inherited from System.Object) |
See base class member description: System.Object.Equals Derived from System.Object, the primary base class for all objects. |
GetHashCode (inherited from System.Object) |
See base class member description: System.Object.GetHashCode Derived from System.Object, the primary base class for all objects. |
GetResponseStream | Returns the Stream onto which the provided response message is to be serialized. |
GetType (inherited from System.Object) |
See base class member description: System.Object.GetType Derived from System.Object, the primary base class for all objects. |
ProcessMessage | Requests message processing from the current sink. |
ToString (inherited from System.Object) |
See base class member description: System.Object.ToString Derived from System.Object, the primary base class for all objects. |
Finalize (inherited from System.Object) |
See base class member description: System.Object.Finalize Derived from System.Object, the primary base class for all objects. |
MemberwiseClone (inherited from System.Object) |
See base class member description: System.Object.MemberwiseClone Derived from System.Object, the primary base class for all objects. |
Hierarchy:
public BinaryServerFormatterSink(BinaryServerFormatterSink( |
protocol
nextSink
receiver
public IServerChannelSink NextChannelSink {get;}
|
public IDictionary Properties {get;}
|
public void AsyncProcessResponse( |
sinkStack
state
msg
headers
stream
~BinaryServerFormatterSink(); |
public virtual int GetHashCode(); |
public Stream GetResponseStream( |
sinkStack
state
msg
headers
public Type GetType(); |
protected object MemberwiseClone(); |
public ServerProcessing ProcessMessage( |
sinkStack
requestMsg
requestHeaders
requestStream
responseMsg
responseHeaders
responseStream
When the formatter channel sink gets a message that needs to be sent over the channel, it calls IMessageSink.SyncProcessMessage, passing the message as a parameter. The formatter sink then creates the transport header array and calls IClientChannelSink.GetRequestStream on the formatter sink. This call is forwarded down the sink chain, and any sink can create a request stream that will be passed back to the formatter sink. After this call returns, the message is serialized, IClientChannelSink.ProcessMessage is called on the first chain in the sink chain, and the message is passed to the channel sinks.
After the channel sinks get the message, they can write data to the stream, add headers to the header array, and add themselves to the sink stack before forwarding the call to the next sink. When the call reaches the transport sink at the end of the chain, the transport sink sends the headers and serialized message over the channel to the server, where the process is reversed.
When the message gets to the server side, the transport sink retrieves the headers and serialized message from the stream and forwards these through the sink chain until the formatter sink is reached. The formatter sink then deserializes the message and forwards it to the remoting infrastructure. Then, the remoting infrastructure turns the message into a method call, and calls the server object.
public virtual string ToString(); |