Options
All
  • Public
  • Public/Protected
  • All
Menu

A publish/subscribe server for Nymph.

Written by Hunter Perrin for SciActive.

author

Hunter Perrin [email protected]

copyright

SciActive Inc

see

http://nymph.io/

Hierarchy

  • PubSub

Index

Constructors

constructor

  • new PubSub(config: Partial<Config>, nymph: default, server: server): PubSub

Properties

config

config: Config

The PubSub config.

nymph

nymph: default

The Nymph instance.

Protected querySubs

querySubs: {} = {}

Type declaration

  • [etype: string]: {}
    • [query: string]: Map<connection, { count: boolean; current: string[]; query: string }>

server

server: server

The WebSocket server.

Private sessions

sessions: Map<connection, string> = ...

Protected uidSubs

uidSubs: {} = {}

Type declaration

  • [uidName: string]: Map<connection, { count: boolean }>

Methods

close

  • close(): void

Private handleAuthentication

Private handlePublish

Private handlePublishEntity

Private handlePublishUid

handleRequest

  • handleRequest(request: request): void

Private handleSubscription

Private handleSubscriptionQuery

Private handleSubscriptionUid

onClose

  • onClose(conn: connection, description: string): void

onError

  • onError(conn: connection, e: Error): void

onMessage

  • onMessage(from: connection, msg: Message): Promise<void>

Private relay

  • relay(message: Message): void

Static initPublisher

  • initPublisher(config: Partial<Config>, nymph: default): void

Static Private publish

  • publish(message: string, config: Config): void

Generated using TypeDoc