ipc: routing channel client

This commit is contained in:
Joao Moreno 2016-09-21 10:28:17 +02:00
parent f9ee9c8fbc
commit d7967dc46f
2 changed files with 4 additions and 4 deletions

View file

@ -74,7 +74,7 @@ export interface IClientRouter {
routeCall(command: string, arg: any): string;
}
export interface IMultiChannelClient {
export interface IRoutingChannelClient {
getChannel<T extends IChannel>(channelName: string, router: IClientRouter): T;
}

View file

@ -10,7 +10,7 @@ import { TPromise } from 'vs/base/common/winjs.base';
import { IDisposable } from 'vs/base/common/lifecycle';
import Event, { Emitter, once } from 'vs/base/common/event';
import { fromEventEmitter } from 'vs/base/node/event';
import { ChannelServer, ChannelClient, IMessagePassingProtocol, IChannelServer, IChannelClient, IMultiChannelClient, IClientRouter, IChannel } from 'vs/base/parts/ipc/common/ipc';
import { ChannelServer, ChannelClient, IMessagePassingProtocol, IChannelServer, IChannelClient, IRoutingChannelClient, IClientRouter, IChannel } from 'vs/base/parts/ipc/common/ipc';
function bufferIndexOf(buffer: Buffer, value: number, start = 0) {
while (start < buffer.length && buffer[start] !== value) {
@ -73,7 +73,7 @@ class Protocol implements IMessagePassingProtocol {
}
}
class RoutingChannelClient implements IMultiChannelClient {
class RoutingChannelClient implements IRoutingChannelClient {
private ipcClients: { [id:string]: ChannelClient; };
@ -107,7 +107,7 @@ class RoutingChannelClient implements IMultiChannelClient {
}
// TODO@joao: move multi channel implementation down to ipc
export class Server implements IChannelServer, IMultiChannelClient, IDisposable {
export class Server implements IChannelServer, IRoutingChannelClient, IDisposable {
private channels: { [name: string]: IChannel };
private router: RoutingChannelClient;