UNPKG

moleculer-web-uws

Version:

The `moleculer-web-uws` is a fast API gateway service for Moleculer based on µWebSockets.js server. Use it to publish your services over HTTP and WebSockets.

20 lines (16 loc) 392 B
const crypto = require('crypto'); class ConnectionContext { constructor(socket) { this.socket = socket; this.id = crypto.randomUUID(); this.cancelKeepAlive = undefined; this.isAlive = true; this.isDisconnecting = true; this.subs = []; this.isReady = false; } ready() { this.isReady = true; } } module.exports = ConnectionContext;