Share via


MessageFormatterDuplexPipeTracker Class

Definition

Assists IJsonRpcMessageFormatter implementations with supporting marshaling IDuplexPipe over JSON-RPC.

public class MessageFormatterDuplexPipeTracker : IDisposable, Microsoft.IDisposableObservable
type MessageFormatterDuplexPipeTracker = class
    interface IDisposableObservable
    interface IDisposable
Public Class MessageFormatterDuplexPipeTracker
Implements IDisposable, IDisposableObservable
Inheritance
MessageFormatterDuplexPipeTracker
Implements

Remarks

Lifetime rules: * The IDuplexPipe always originates on the client and passed as an argument to the server. Servers are not allowed to return IDuplexPipe to clients because the server would have no feedback if the client dropped it, leaking resources. * The client can only send an IDuplexPipe in a request (that expects a response). Notifications would not provide the client with feedback that the server dropped it, leaking resources. * The client will immediately terminate the IDuplexPipe if the server returns ANY error in response to the request, since the server may not be aware of the IDuplexPipe. * The IDuplexPipe will NOT be terminated when a successful response is received from the server. Client and server are expected to negotiate the end of the IDuplexPipe themselves.

Constructors

MessageFormatterDuplexPipeTracker()

Initializes a new instance of the MessageFormatterDuplexPipeTracker class.

MessageFormatterDuplexPipeTracker(JsonRpc, IJsonRpcFormatterState)

Initializes a new instance of the MessageFormatterDuplexPipeTracker class.

Properties

MultiplexingStream

Gets or sets the multiplexing stream used to create and accept channels.

RequestIdBeingDeserialized

Gets or sets the ID of the request currently being deserialized for use as a key in StreamJsonRpc.Reflection.MessageFormatterDuplexPipeTracker.inboundRequestChannelMap.

RequestIdBeingSerialized

Gets or sets the id of the request currently being serialized for use as a key in StreamJsonRpc.Reflection.MessageFormatterDuplexPipeTracker.outboundRequestChannelMap.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Dispose(Boolean)

Disposes managed and native resources held by this instance.

GetPipe(Nullable<Int32>)
Obsolete.

Creates an IDuplexPipe from a given token as it is received at the RPC server as a method argument.

GetPipe(Nullable<UInt64>)

Creates an IDuplexPipe from a given token as it is received at the RPC server as a method argument.

GetPipeReader(Nullable<Int32>)
Obsolete.

Creates a PipeReader from a given token as it is received at the RPC server as a method argument.

GetPipeReader(Nullable<UInt64>)

Creates a PipeReader from a given token as it is received at the RPC server as a method argument.

GetPipeWriter(Nullable<Int32>)
Obsolete.

Creates a PipeWriter from a given token as it is received at the RPC server as a method argument.

GetPipeWriter(Nullable<UInt64>)

Creates a PipeWriter from a given token as it is received at the RPC server as a method argument.

GetToken(IDuplexPipe)
Obsolete.

Creates a token to represent an IDuplexPipe as it is transmitted from the client to an RPC server as a method argument.

GetToken(PipeReader)
Obsolete.

Creates a token to represent a PipeReader as it is transmitted from the client to an RPC server as a method argument.

GetToken(PipeWriter)
Obsolete.

Creates a token to represent a PipeWriter as it is transmitted from the client to an RPC server as a method argument.

GetULongToken(IDuplexPipe)

Creates a token to represent an IDuplexPipe as it is transmitted from the client to an RPC server as a method argument.

GetULongToken(PipeReader)

Creates a token to represent a PipeReader as it is transmitted from the client to an RPC server as a method argument.

GetULongToken(PipeWriter)

Creates a token to represent a PipeWriter as it is transmitted from the client to an RPC server as a method argument.

OnResponseReceived(Int64, Boolean)

Notifies this tracker when a response to any request is received so that appropriate channel and state cleanup can take place.

OnResponseSent(Object, Boolean)

Notifies this tracker when a response to any request is sent so that appropriate channel and state cleanup can take place.

Explicit Interface Implementations

IDisposableObservable.IsDisposed

Gets a value indicating whether this instance has been disposed.

Applies to