@@ -8,6 +8,7 @@ import { Event, Emitter, Relay } from 'vs/base/common/event';
88import { CancelablePromise , createCancelablePromise , timeout } from 'vs/base/common/async' ;
99import { CancellationToken , CancellationTokenSource } from 'vs/base/common/cancellation' ;
1010import * as errors from 'vs/base/common/errors' ;
11+ import { IServerChannel , IChannel } from 'vs/base/parts/ipc/common/ipc' ;
1112
1213export const enum RequestType {
1314 Promise = 100 ,
@@ -51,27 +52,6 @@ enum State {
5152 Idle
5253}
5354
54- /**
55- * An `IChannel` is an abstraction over a collection of commands.
56- * You can `call` several commands on a channel, each taking at
57- * most one single argument. A `call` always returns a promise
58- * with at most one single return value.
59- */
60- export interface IChannel {
61- call < T > ( command : string , arg ?: any , cancellationToken ?: CancellationToken ) : Promise < T > ;
62- listen < T > ( event : string , arg ?: any ) : Event < T > ;
63- }
64-
65- /**
66- * An `IServerChannel` is the couter part to `IChannel`,
67- * on the server-side. You should implement this interface
68- * if you'd like to handle remote promises or events.
69- */
70- export interface IServerChannel < TContext = string > {
71- call < T > ( ctx : TContext , command : string , arg ?: any , cancellationToken ?: CancellationToken ) : Promise < T > ;
72- listen < T > ( ctx : TContext , event : string , arg ?: any ) : Event < T > ;
73- }
74-
7555/**
7656 * An `IChannelServer` hosts a collection of channels. You are
7757 * able to register channels onto it, provided a channel name.
0 commit comments