Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SharedWorkerServer<Provider>

SharedWorker server.

  • available only in Web Browser.

The SharedWorkerServer is a class representing a server server in a SharedWorker environment. Clients connecting to the SharedWorkerServer would communicate with this server through SharedWorkerAcceptor objects using RFC (Remote Function Call).

To open the server, use the open() method with a callback function which would be called whenever a client has been connected. After your business, don't forget to closing the connection using one of them below. If you don't close that, vulnerable memory usage and communication channel would not be destroyed and it may cause the memory leak.

author

Jeongho Nam http://samchon.org

Type parameters

  • Provider: object

    Type of features provided for remote system.

Hierarchy

  • SharedWorkerServer

Implements

  • IServer<SharedWorkerServer.State>

Index

Constructors

Accessors

Methods

Constructors

constructor

Accessors

state

  • get state(): SharedWorkerServer.State

Methods

close

  • close(): Promise<void>
  • Close server.

    Close all connections between its remote clients (SharedWorkerConnectors).

    It destories all RFCs (remote function calls) between this server and remote clients (through Driver<Controller>) that are not returned (completed) yet. The destruction causes all incompleted RFCs to throw exceptions.

    Returns Promise<void>

open

  • open(handler: function): Promise<void>

Generated using TypeDoc