Skip to main content

namespace RemoteChannelServer

A RemoteChannel server communicates with a RemoteChannel client through the given message port, and allows clients to easily create new channels to communicate with processes in the server context. The server needs to set up handlers to deal with the created channels.

Companion interface: RemoteChannelServer

Interfaces

NameDescription
RemoteChannelServer.ConstructorsDefines the static RemoteChannelServer API.

Static Methods

create

Resolves, if succesful, to a new RemoteChannelServer that can listen to client requests to create new channels.

Definition

create(config: {
      port: RemoteChannel.SimpleMessagePort;
      rcsChannelId?: string;
    }): Promise<RemoteChannelServer>;

Parameters

NameTypeDescription
config{
      port: RemoteChannel.SimpleMessagePort;
      rcsChannelId?: string;
    }
the configuration for the RemoteChannelServer to be created:
- port: the message port to communicate with the client - rcsChannelId: (optional) an alternative channel id to use for communication with the client