nerdbank-streams 2.10.37-alpha → 2.10.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/js/AcceptanceParameters.d.ts +4 -4
  2. package/js/AcceptanceParameters.js +2 -2
  3. package/js/Channel.d.ts +71 -70
  4. package/js/Channel.js +219 -219
  5. package/js/Channel.js.map +1 -1
  6. package/js/ChannelOptions.d.ts +4 -4
  7. package/js/ChannelOptions.js +2 -2
  8. package/js/ControlCode.d.ts +30 -30
  9. package/js/ControlCode.js +34 -34
  10. package/js/ControlCode.js.map +1 -1
  11. package/js/Deferred.d.ts +39 -39
  12. package/js/Deferred.js +67 -67
  13. package/js/FrameHeader.d.ts +20 -20
  14. package/js/FrameHeader.js +39 -39
  15. package/js/FullDuplexStream.d.ts +10 -10
  16. package/js/FullDuplexStream.js +31 -31
  17. package/js/IChannelOfferEventArgs.d.ts +17 -17
  18. package/js/IChannelOfferEventArgs.js +2 -2
  19. package/js/IDisposableObservable.d.ts +4 -4
  20. package/js/IDisposableObservable.js +2 -2
  21. package/js/MultiplexingStream.d.ts +220 -218
  22. package/js/MultiplexingStream.js +624 -610
  23. package/js/MultiplexingStream.js.map +1 -1
  24. package/js/MultiplexingStreamFormatters.d.ts +90 -89
  25. package/js/MultiplexingStreamFormatters.js +302 -302
  26. package/js/MultiplexingStreamOptions.d.ts +18 -18
  27. package/js/MultiplexingStreamOptions.js +2 -2
  28. package/js/OfferParameters.d.ts +6 -6
  29. package/js/OfferParameters.js +2 -2
  30. package/js/QualifiedChannelId.d.ts +25 -25
  31. package/js/QualifiedChannelId.js +38 -38
  32. package/js/QualifiedChannelId.js.map +1 -1
  33. package/js/Utilities.d.ts +12 -11
  34. package/js/Utilities.js +154 -154
  35. package/js/index.d.ts +8 -8
  36. package/js/index.js +15 -15
  37. package/package.json +18 -18
  38. package/src/MultiplexingStream.ts +18 -1
@@ -1,218 +1,220 @@
1
- /// <reference types="node" />
2
- import CancellationToken from 'cancellationtoken';
3
- import { Channel, ChannelClass } from './Channel';
4
- import { ChannelOptions } from './ChannelOptions';
5
- import { ControlCode } from './ControlCode';
6
- import { Deferred } from './Deferred';
7
- import { FrameHeader } from './FrameHeader';
8
- import { IChannelOfferEventArgs } from './IChannelOfferEventArgs';
9
- import { IDisposableObservable } from './IDisposableObservable';
10
- import { MultiplexingStreamFormatter } from './MultiplexingStreamFormatters';
11
- import './MultiplexingStreamOptions';
12
- import { MultiplexingStreamOptions } from './MultiplexingStreamOptions';
13
- import { QualifiedChannelId } from './QualifiedChannelId';
14
- export declare abstract class MultiplexingStream implements IDisposableObservable {
15
- protected readonly formatter: MultiplexingStreamFormatter;
16
- private readonly isOdd;
17
- /**
18
- * The maximum length of a frame's payload.
19
- */
20
- static readonly framePayloadMaxLength: number;
21
- private static readonly recommendedDefaultChannelReceivingWindowSize;
22
- /** The default window size used for new channels that do not specify a value for ChannelOptions.ChannelReceivingWindowSize. */
23
- readonly defaultChannelReceivingWindowSize: number;
24
- protected get disposalToken(): CancellationToken;
25
- /**
26
- * Gets a promise that is resolved or rejected based on how this stream is disposed or fails.
27
- */
28
- get completion(): Promise<void>;
29
- /**
30
- * Gets a value indicating whether this instance has been disposed.
31
- */
32
- get isDisposed(): boolean;
33
- /**
34
- * Initializes a new instance of the `MultiplexingStream` class.
35
- * @param stream The duplex stream to read and write to.
36
- * Use `FullDuplexStream.Splice` if you have distinct input/output streams.
37
- * @param options Options to customize the behavior of the stream.
38
- * @param cancellationToken A token whose cancellation aborts the handshake with the remote end.
39
- * @returns The multiplexing stream, once the handshake is complete.
40
- */
41
- static CreateAsync(stream: NodeJS.ReadWriteStream, options?: MultiplexingStreamOptions, cancellationToken?: CancellationToken): Promise<MultiplexingStream>;
42
- /**
43
- * Initializes a new instance of the `MultiplexingStream` class
44
- * with protocolMajorVersion set to 3.
45
- * @param stream The duplex stream to read and write to.
46
- * Use `FullDuplexStream.Splice` if you have distinct input/output streams.
47
- * @param options Options to customize the behavior of the stream.
48
- * @returns The multiplexing stream.
49
- */
50
- static Create(stream: NodeJS.ReadWriteStream, options?: MultiplexingStreamOptions): MultiplexingStream;
51
- /**
52
- * The options to use for channels we create in response to incoming offers.
53
- * @description Whatever these settings are, they can be replaced when the channel is accepted.
54
- */
55
- protected static readonly defaultChannelOptions: ChannelOptions;
56
- /**
57
- * The encoding used for characters in control frames.
58
- */
59
- static readonly ControlFrameEncoding = "utf-8";
60
- protected readonly _completionSource: Deferred<void>;
61
- /**
62
- * A dictionary of channels that were seeded, keyed by their ID.
63
- */
64
- protected readonly seededOpenChannels: {
65
- [id: number]: ChannelClass;
66
- };
67
- /**
68
- * A dictionary of channels that were offered locally, keyed by their ID.
69
- */
70
- protected readonly locallyOfferedOpenChannels: {
71
- [id: number]: ChannelClass;
72
- };
73
- /**
74
- * A dictionary of channels that were offered remotely, keyed by their ID.
75
- */
76
- protected readonly remotelyOfferedOpenChannels: {
77
- [id: number]: ChannelClass;
78
- };
79
- /**
80
- * The last number assigned to a channel.
81
- * Each use of this should increment by two if isOdd is defined.
82
- * It should never exceed uint32.MaxValue
83
- */
84
- protected abstract lastOfferedChannelId: number;
85
- /**
86
- * A map of channel names to queues of channels waiting for local acceptance.
87
- */
88
- protected readonly channelsOfferedByThemByName: {
89
- [name: string]: ChannelClass[];
90
- };
91
- /**
92
- * A map of channel names to queues of Deferred<Channel> from waiting accepters.
93
- */
94
- protected readonly acceptingChannels: {
95
- [name: string]: Deferred<ChannelClass>[];
96
- };
97
- /** The major version of the protocol being used for this connection. */
98
- protected readonly protocolMajorVersion: number;
99
- private readonly eventEmitter;
100
- private disposalTokenSource;
101
- protected constructor(formatter: MultiplexingStreamFormatter, isOdd: boolean | undefined, options: MultiplexingStreamOptions);
102
- /**
103
- * Creates an anonymous channel that may be accepted by <see cref="AcceptChannel(int, ChannelOptions)"/>.
104
- * Its existance must be communicated by other means (typically another, existing channel) to encourage acceptance.
105
- * @param options A set of options that describe local treatment of this channel.
106
- * @returns The anonymous channel.
107
- * @description Note that while the channel is created immediately, any local write to that channel will be
108
- * buffered locally until the remote party accepts the channel.
109
- */
110
- createChannel(options?: ChannelOptions): Channel;
111
- /**
112
- * Accepts a channel with a specific ID.
113
- * @param id The id of the channel to accept.
114
- * @param options A set of options that describe local treatment of this channel.
115
- * @description This method can be used to accept anonymous channels created with <see cref="CreateChannel"/>.
116
- * Unlike <see cref="AcceptChannelAsync(string, ChannelOptions, CancellationToken)"/> which will await
117
- * for a channel offer if a matching one has not been made yet, this method only accepts an offer
118
- * for a channel that has already been made.
119
- */
120
- acceptChannel(id: number, options?: ChannelOptions): Channel;
121
- /**
122
- * Rejects an offer for the channel with a specified ID.
123
- * @param id The ID of the channel whose offer should be rejected.
124
- */
125
- rejectChannel(id: number): void;
126
- /**
127
- * Offers a new, named channel to the remote party so they may accept it with
128
- * {@link acceptChannelAsync}.
129
- * @param name A name for the channel, which must be accepted on the remote end to complete creation.
130
- * It need not be unique, and may be empty but must not be null.
131
- * Any characters are allowed, and max length is determined by the maximum frame payload (based on UTF-8 encoding).
132
- * @param options A set of options that describe local treatment of this channel.
133
- * @param cancellationToken A cancellation token. Do NOT let this be a long-lived token
134
- * or a memory leak will result since we add continuations to its promise.
135
- * @returns A task that completes with the `Channel` if the offer is accepted on the remote end
136
- * or faults with `MultiplexingProtocolException` if the remote end rejects the channel.
137
- */
138
- offerChannelAsync(name: string, options?: ChannelOptions, cancellationToken?: CancellationToken): Promise<Channel>;
139
- /**
140
- * Accepts a channel that the remote end has attempted or may attempt to create.
141
- * @param name The name of the channel to accept.
142
- * @param options A set of options that describe local treatment of this channel.
143
- * @param cancellationToken A token to indicate lost interest in accepting the channel.
144
- * Do NOT let this be a long-lived token
145
- * or a memory leak will result since we add continuations to its promise.
146
- * @returns The `Channel`, after its offer has been received from the remote party and accepted.
147
- * @description If multiple offers exist with the specified `name`, the first one received will be accepted.
148
- */
149
- acceptChannelAsync(name: string, options?: ChannelOptions, cancellationToken?: CancellationToken): Promise<Channel>;
150
- /**
151
- * Disposes the stream.
152
- */
153
- dispose(): void;
154
- on(event: 'channelOffered', listener: (args: IChannelOfferEventArgs) => void): void;
155
- off(event: 'channelOffered', listener: (args: IChannelOfferEventArgs) => void): void;
156
- once(event: 'channelOffered', listener: (args: IChannelOfferEventArgs) => void): void;
157
- protected raiseChannelOffered(id: number, name: string, isAccepted: boolean): void;
158
- protected abstract sendFrameAsync(header: FrameHeader, payload: Buffer, cancellationToken: CancellationToken): Promise<void>;
159
- protected abstract sendFrame(code: ControlCode, channelId: QualifiedChannelId): Promise<void>;
160
- protected acceptChannelOrThrow(channel: ChannelClass, options?: ChannelOptions): void;
161
- /**
162
- * Disposes this instance if the specified promise is rejected.
163
- * @param promise The promise to check for failures.
164
- */
165
- protected rejectOnFailure<T>(promise: Promise<T>): Promise<void>;
166
- protected removeChannelFromOfferedQueue(channel: ChannelClass): void;
167
- protected getOpenChannel(qualifiedId: QualifiedChannelId): ChannelClass | undefined;
168
- protected setOpenChannel(channel: ChannelClass): void;
169
- protected deleteOpenChannel(qualifiedId: QualifiedChannelId): void;
170
- private getChannelCollection;
171
- /**
172
- * Cancels a prior call to acceptChannelAsync
173
- * @param channel The promise of a channel to be canceled.
174
- * @param name The name of the channel the caller was accepting.
175
- * @param reason The reason for cancellation.
176
- */
177
- private acceptChannelCanceled;
178
- /**
179
- * Responds to cancellation of a prior call to offerChannelAsync.
180
- * @param channel The channel previously offered.
181
- */
182
- private offerChannelCanceled;
183
- /**
184
- * Gets a unique number that can be used to represent a channel.
185
- * @description The channel numbers increase by two in order to maintain odd or even numbers,
186
- * since each party is allowed to create only one or the other.
187
- */
188
- private getUnusedChannelId;
189
- }
190
- export declare class MultiplexingStreamClass extends MultiplexingStream {
191
- protected lastOfferedChannelId: number;
192
- private readonly sendingSemaphore;
193
- constructor(formatter: MultiplexingStreamFormatter, isOdd: boolean | undefined, options: MultiplexingStreamOptions);
194
- get backpressureSupportEnabled(): boolean;
195
- sendFrameAsync(header: FrameHeader, payload?: Buffer, cancellationToken?: CancellationToken): Promise<void>;
196
- /**
197
- * Transmits a frame over the stream.
198
- * @param code The op code for the channel.
199
- * @param channelId The ID of the channel to receive the frame.
200
- * @description The promise returned from this function is always resolved (not rejected)
201
- * since it is anticipated that callers may not be awaiting its result.
202
- */
203
- sendFrame(code: ControlCode, channelId: QualifiedChannelId): Promise<void>;
204
- onChannelWritingCompleted(channel: ChannelClass): void;
205
- onChannelDisposed(channel: ChannelClass, error: Error | null): Promise<void>;
206
- localContentExamined(channel: ChannelClass, bytesConsumed: number): void;
207
- private readFromStream;
208
- private onOffer;
209
- private onOfferAccepted;
210
- private onContent;
211
- private onContentProcessed;
212
- private onContentWritingCompleted;
213
- /**
214
- * Occurs when the remote party has terminated a channel (including canceling an offer).
215
- * @param channelId The ID of the terminated channel.
216
- */
217
- private onChannelTerminated;
218
- }
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ import CancellationToken from 'cancellationtoken';
4
+ import { Channel, ChannelClass } from './Channel';
5
+ import { ChannelOptions } from './ChannelOptions';
6
+ import { ControlCode } from './ControlCode';
7
+ import { Deferred } from './Deferred';
8
+ import { FrameHeader } from './FrameHeader';
9
+ import { IChannelOfferEventArgs } from './IChannelOfferEventArgs';
10
+ import { IDisposableObservable } from './IDisposableObservable';
11
+ import { MultiplexingStreamFormatter } from './MultiplexingStreamFormatters';
12
+ import './MultiplexingStreamOptions';
13
+ import { MultiplexingStreamOptions } from './MultiplexingStreamOptions';
14
+ import { QualifiedChannelId } from './QualifiedChannelId';
15
+ export declare abstract class MultiplexingStream implements IDisposableObservable {
16
+ protected readonly formatter: MultiplexingStreamFormatter;
17
+ private readonly isOdd;
18
+ /**
19
+ * The maximum length of a frame's payload.
20
+ */
21
+ static readonly framePayloadMaxLength: number;
22
+ private static readonly recommendedDefaultChannelReceivingWindowSize;
23
+ /** The default window size used for new channels that do not specify a value for ChannelOptions.ChannelReceivingWindowSize. */
24
+ readonly defaultChannelReceivingWindowSize: number;
25
+ protected get disposalToken(): CancellationToken;
26
+ /**
27
+ * Gets a promise that is resolved or rejected based on how this stream is disposed or fails.
28
+ */
29
+ get completion(): Promise<void>;
30
+ /**
31
+ * Gets a value indicating whether this instance has been disposed.
32
+ */
33
+ get isDisposed(): boolean;
34
+ /**
35
+ * Initializes a new instance of the `MultiplexingStream` class.
36
+ * @param stream The duplex stream to read and write to.
37
+ * Use `FullDuplexStream.Splice` if you have distinct input/output streams.
38
+ * @param options Options to customize the behavior of the stream.
39
+ * @param cancellationToken A token whose cancellation aborts the handshake with the remote end.
40
+ * @returns The multiplexing stream, once the handshake is complete.
41
+ */
42
+ static CreateAsync(stream: NodeJS.ReadWriteStream, options?: MultiplexingStreamOptions, cancellationToken?: CancellationToken): Promise<MultiplexingStream>;
43
+ /**
44
+ * Initializes a new instance of the `MultiplexingStream` class
45
+ * with protocolMajorVersion set to 3.
46
+ * @param stream The duplex stream to read and write to.
47
+ * Use `FullDuplexStream.Splice` if you have distinct input/output streams.
48
+ * @param options Options to customize the behavior of the stream.
49
+ * @returns The multiplexing stream.
50
+ */
51
+ static Create(stream: NodeJS.ReadWriteStream, options?: MultiplexingStreamOptions): MultiplexingStream;
52
+ /**
53
+ * The options to use for channels we create in response to incoming offers.
54
+ * @description Whatever these settings are, they can be replaced when the channel is accepted.
55
+ */
56
+ protected static readonly defaultChannelOptions: ChannelOptions;
57
+ /**
58
+ * The encoding used for characters in control frames.
59
+ */
60
+ static readonly ControlFrameEncoding = "utf-8";
61
+ protected readonly _completionSource: Deferred<void>;
62
+ /**
63
+ * A dictionary of channels that were seeded, keyed by their ID.
64
+ */
65
+ protected readonly seededOpenChannels: {
66
+ [id: number]: ChannelClass;
67
+ };
68
+ /**
69
+ * A dictionary of channels that were offered locally, keyed by their ID.
70
+ */
71
+ protected readonly locallyOfferedOpenChannels: {
72
+ [id: number]: ChannelClass;
73
+ };
74
+ /**
75
+ * A dictionary of channels that were offered remotely, keyed by their ID.
76
+ */
77
+ protected readonly remotelyOfferedOpenChannels: {
78
+ [id: number]: ChannelClass;
79
+ };
80
+ /**
81
+ * The last number assigned to a channel.
82
+ * Each use of this should increment by two if isOdd is defined.
83
+ * It should never exceed uint32.MaxValue
84
+ */
85
+ protected abstract lastOfferedChannelId: number;
86
+ /**
87
+ * A map of channel names to queues of channels waiting for local acceptance.
88
+ */
89
+ protected readonly channelsOfferedByThemByName: {
90
+ [name: string]: ChannelClass[];
91
+ };
92
+ /**
93
+ * A map of channel names to queues of Deferred<Channel> from waiting accepters.
94
+ */
95
+ protected readonly acceptingChannels: {
96
+ [name: string]: Deferred<ChannelClass>[];
97
+ };
98
+ /** The major version of the protocol being used for this connection. */
99
+ protected readonly protocolMajorVersion: number;
100
+ private readonly eventEmitter;
101
+ private disposalTokenSource;
102
+ protected constructor(formatter: MultiplexingStreamFormatter, isOdd: boolean | undefined, options: MultiplexingStreamOptions);
103
+ /**
104
+ * Creates an anonymous channel that may be accepted by <see cref="AcceptChannel(int, ChannelOptions)"/>.
105
+ * Its existance must be communicated by other means (typically another, existing channel) to encourage acceptance.
106
+ * @param options A set of options that describe local treatment of this channel.
107
+ * @returns The anonymous channel.
108
+ * @description Note that while the channel is created immediately, any local write to that channel will be
109
+ * buffered locally until the remote party accepts the channel.
110
+ */
111
+ createChannel(options?: ChannelOptions): Channel;
112
+ /**
113
+ * Accepts a channel with a specific ID.
114
+ * @param id The id of the channel to accept.
115
+ * @param options A set of options that describe local treatment of this channel.
116
+ * @description This method can be used to accept anonymous channels created with <see cref="CreateChannel"/>.
117
+ * Unlike <see cref="AcceptChannelAsync(string, ChannelOptions, CancellationToken)"/> which will await
118
+ * for a channel offer if a matching one has not been made yet, this method only accepts an offer
119
+ * for a channel that has already been made.
120
+ */
121
+ acceptChannel(id: number, options?: ChannelOptions): Channel;
122
+ /**
123
+ * Rejects an offer for the channel with a specified ID.
124
+ * @param id The ID of the channel whose offer should be rejected.
125
+ */
126
+ rejectChannel(id: number): void;
127
+ /**
128
+ * Offers a new, named channel to the remote party so they may accept it with
129
+ * {@link acceptChannelAsync}.
130
+ * @param name A name for the channel, which must be accepted on the remote end to complete creation.
131
+ * It need not be unique, and may be empty but must not be null.
132
+ * Any characters are allowed, and max length is determined by the maximum frame payload (based on UTF-8 encoding).
133
+ * @param options A set of options that describe local treatment of this channel.
134
+ * @param cancellationToken A cancellation token. Do NOT let this be a long-lived token
135
+ * or a memory leak will result since we add continuations to its promise.
136
+ * @returns A task that completes with the `Channel` if the offer is accepted on the remote end
137
+ * or faults with `MultiplexingProtocolException` if the remote end rejects the channel.
138
+ */
139
+ offerChannelAsync(name: string, options?: ChannelOptions, cancellationToken?: CancellationToken): Promise<Channel>;
140
+ /**
141
+ * Accepts a channel that the remote end has attempted or may attempt to create.
142
+ * @param name The name of the channel to accept.
143
+ * @param options A set of options that describe local treatment of this channel.
144
+ * @param cancellationToken A token to indicate lost interest in accepting the channel.
145
+ * Do NOT let this be a long-lived token
146
+ * or a memory leak will result since we add continuations to its promise.
147
+ * @returns The `Channel`, after its offer has been received from the remote party and accepted.
148
+ * @description If multiple offers exist with the specified `name`, the first one received will be accepted.
149
+ */
150
+ acceptChannelAsync(name: string, options?: ChannelOptions, cancellationToken?: CancellationToken): Promise<Channel>;
151
+ /**
152
+ * Disposes the stream.
153
+ */
154
+ dispose(): void;
155
+ protected disposeCore(remoteDisconnect: boolean): void;
156
+ on(event: 'channelOffered', listener: (args: IChannelOfferEventArgs) => void): void;
157
+ off(event: 'channelOffered', listener: (args: IChannelOfferEventArgs) => void): void;
158
+ once(event: 'channelOffered', listener: (args: IChannelOfferEventArgs) => void): void;
159
+ protected raiseChannelOffered(id: number, name: string, isAccepted: boolean): void;
160
+ protected abstract sendFrameAsync(header: FrameHeader, payload: Buffer, cancellationToken: CancellationToken): Promise<void>;
161
+ protected abstract sendFrame(code: ControlCode, channelId: QualifiedChannelId): Promise<void>;
162
+ protected acceptChannelOrThrow(channel: ChannelClass, options?: ChannelOptions): void;
163
+ /**
164
+ * Disposes this instance if the specified promise is rejected.
165
+ * @param promise The promise to check for failures.
166
+ */
167
+ protected rejectOnFailure<T>(promise: Promise<T>): Promise<void>;
168
+ protected removeChannelFromOfferedQueue(channel: ChannelClass): void;
169
+ protected getOpenChannel(qualifiedId: QualifiedChannelId): ChannelClass | undefined;
170
+ protected setOpenChannel(channel: ChannelClass): void;
171
+ protected deleteOpenChannel(qualifiedId: QualifiedChannelId): void;
172
+ private getChannelCollection;
173
+ /**
174
+ * Cancels a prior call to acceptChannelAsync
175
+ * @param channel The promise of a channel to be canceled.
176
+ * @param name The name of the channel the caller was accepting.
177
+ * @param reason The reason for cancellation.
178
+ */
179
+ private acceptChannelCanceled;
180
+ /**
181
+ * Responds to cancellation of a prior call to offerChannelAsync.
182
+ * @param channel The channel previously offered.
183
+ */
184
+ private offerChannelCanceled;
185
+ /**
186
+ * Gets a unique number that can be used to represent a channel.
187
+ * @description The channel numbers increase by two in order to maintain odd or even numbers,
188
+ * since each party is allowed to create only one or the other.
189
+ */
190
+ private getUnusedChannelId;
191
+ }
192
+ export declare class MultiplexingStreamClass extends MultiplexingStream {
193
+ protected lastOfferedChannelId: number;
194
+ private readonly sendingSemaphore;
195
+ constructor(formatter: MultiplexingStreamFormatter, isOdd: boolean | undefined, options: MultiplexingStreamOptions);
196
+ get backpressureSupportEnabled(): boolean;
197
+ sendFrameAsync(header: FrameHeader, payload?: Buffer, cancellationToken?: CancellationToken): Promise<void>;
198
+ /**
199
+ * Transmits a frame over the stream.
200
+ * @param code The op code for the channel.
201
+ * @param channelId The ID of the channel to receive the frame.
202
+ * @description The promise returned from this function is always resolved (not rejected)
203
+ * since it is anticipated that callers may not be awaiting its result.
204
+ */
205
+ sendFrame(code: ControlCode, channelId: QualifiedChannelId): Promise<void>;
206
+ onChannelWritingCompleted(channel: ChannelClass): void;
207
+ onChannelDisposed(channel: ChannelClass, error: Error | null): Promise<void>;
208
+ localContentExamined(channel: ChannelClass, bytesConsumed: number): void;
209
+ private readFromStream;
210
+ private onOffer;
211
+ private onOfferAccepted;
212
+ private onContent;
213
+ private onContentProcessed;
214
+ private onContentWritingCompleted;
215
+ /**
216
+ * Occurs when the remote party has terminated a channel (including canceling an offer).
217
+ * @param channelId The ID of the terminated channel.
218
+ */
219
+ private onChannelTerminated;
220
+ }