@eleven-am/pondsocket 0.1.200 → 0.1.202

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eleven-am/pondsocket",
3
- "version": "0.1.200",
3
+ "version": "0.1.202",
4
4
  "description": "PondSocket is a fast simple socket server",
5
5
  "keywords": [
6
6
  "socket",
@@ -23,7 +23,7 @@
23
23
  "remove": "rm -r dist/tests && rm dist/distIndex.js",
24
24
  "copy": "cp src/types.d.ts dist/types.d.ts && cp src/distIndex.ts dist/index.d.ts && cp package.json dist && cp README.md dist && cp LICENSE dist",
25
25
  "push": "npm version patch && npm run copy && cd dist && npm publish && cd ..",
26
- "pipeline": "npm run lint && npm run test && npm run build && npm run push"
26
+ "pipeline": "npm run lint:fix && npm run lint && npm run test && npm run build && npm run push"
27
27
  },
28
28
  "author": "Roy OSSAI",
29
29
  "license": "GPL-3.0",
@@ -35,31 +35,31 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@eleven-am/pondsocket-common": "^0.0.26",
38
- "ioredis": "^5.6.1",
39
- "ws": "^8.18.1"
38
+ "redis": "^5.5.6",
39
+ "ws": "^8.18.2"
40
40
  },
41
41
  "devDependencies": {
42
- "@eslint/compat": "^1.2.8",
42
+ "@eslint/compat": "^1.2.9",
43
43
  "@eslint/eslintrc": "^3.3.1",
44
- "@eslint/js": "^9.25.1",
45
- "@stylistic/eslint-plugin-ts": "^4.2.0",
44
+ "@eslint/js": "^9.28.0",
45
+ "@stylistic/eslint-plugin-ts": "^4.4.1",
46
46
  "@types/jest": "^29.5.14",
47
- "@types/node": "^22.15.3",
47
+ "@types/node": "^22.15.30",
48
48
  "@types/ws": "^8.18.1",
49
- "@typescript-eslint/eslint-plugin": "^8.31.1",
50
- "@typescript-eslint/parser": "^8.31.1",
51
- "eslint": "^9.25.1",
52
- "eslint-config-prettier": "^10.1.2",
49
+ "@typescript-eslint/eslint-plugin": "^8.33.1",
50
+ "@typescript-eslint/parser": "^8.33.1",
51
+ "eslint": "^9.28.0",
52
+ "eslint-config-prettier": "^10.1.5",
53
53
  "eslint-import-resolver-node": "^0.3.9",
54
54
  "eslint-plugin-file-progress": "^3.0.2",
55
55
  "eslint-plugin-import": "^2.31.0",
56
- "eslint-plugin-prettier": "^5.2.6",
57
- "globals": "^16.0.0",
56
+ "eslint-plugin-prettier": "^5.4.1",
57
+ "globals": "^16.2.0",
58
58
  "jest": "^29.7.0",
59
59
  "prettier": "^3.5.3",
60
60
  "source-map-support": "^0.5.21",
61
- "supertest": "^7.1.0",
62
- "ts-jest": "^29.3.2",
61
+ "supertest": "^7.1.1",
62
+ "ts-jest": "^29.3.4",
63
63
  "ts-loader": "^9.5.2",
64
64
  "ts-node": "^10.9.2",
65
65
  "tsconfig-paths": "^4.2.0",
package/server/server.js CHANGED
@@ -10,7 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
10
10
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
11
11
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
12
  };
13
- var _PondSocket_instances, _PondSocket_exclusiveServer, _PondSocket_server, _PondSocket_socketServer, _PondSocket_middleware, _PondSocket_manageHeartbeat, _PondSocket_init, _PondSocket_getCookies;
13
+ var _PondSocket_instances, _PondSocket_server, _PondSocket_exclusiveServer, _PondSocket_socketServer, _PondSocket_backend, _PondSocket_middleware, _PondSocket_handleUpgrade, _PondSocket_manageHeartbeat, _PondSocket_init, _PondSocket_getCookies;
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.PondSocket = void 0;
16
16
  const http_1 = require("http");
@@ -22,15 +22,17 @@ const endpointEngine_1 = require("../engines/endpointEngine");
22
22
  const matcher_1 = require("../matcher/matcher");
23
23
  const endpoint_1 = require("../wrappers/endpoint");
24
24
  class PondSocket {
25
- constructor({ server, socketServer, exclusiveServer = true, } = {}) {
25
+ constructor({ server, socketServer, exclusiveServer = true, distributedBackend, } = {}) {
26
26
  _PondSocket_instances.add(this);
27
- _PondSocket_exclusiveServer.set(this, void 0);
28
27
  _PondSocket_server.set(this, void 0);
28
+ _PondSocket_exclusiveServer.set(this, void 0);
29
29
  _PondSocket_socketServer.set(this, void 0);
30
+ _PondSocket_backend.set(this, void 0);
30
31
  _PondSocket_middleware.set(this, void 0);
31
32
  __classPrivateFieldSet(this, _PondSocket_middleware, new middleware_1.Middleware(), "f");
32
33
  __classPrivateFieldSet(this, _PondSocket_exclusiveServer, exclusiveServer, "f");
33
34
  __classPrivateFieldSet(this, _PondSocket_server, server !== null && server !== void 0 ? server : new http_1.Server(), "f");
35
+ __classPrivateFieldSet(this, _PondSocket_backend, distributedBackend !== null && distributedBackend !== void 0 ? distributedBackend : null, "f");
34
36
  __classPrivateFieldSet(this, _PondSocket_socketServer, socketServer !== null && socketServer !== void 0 ? socketServer : new ws_1.WebSocketServer({ noServer: true }), "f");
35
37
  __classPrivateFieldGet(this, _PondSocket_instances, "m", _PondSocket_init).call(this);
36
38
  }
@@ -50,7 +52,7 @@ class PondSocket {
50
52
  * Create a new endpoint
51
53
  */
52
54
  createEndpoint(path, handler) {
53
- const endpoint = new endpointEngine_1.EndpointEngine();
55
+ const endpoint = new endpointEngine_1.EndpointEngine(String(path), __classPrivateFieldGet(this, _PondSocket_backend, "f"));
54
56
  __classPrivateFieldGet(this, _PondSocket_middleware, "f").use((req, params, next) => {
55
57
  const event = (0, matcher_1.parseAddress)(path, req.address);
56
58
  if (!event) {
@@ -67,38 +69,34 @@ class PondSocket {
67
69
  });
68
70
  return new endpoint_1.Endpoint(endpoint);
69
71
  }
70
- /**
71
- * Handle WebSocket upgrade requests
72
- */
73
- handleUpgrade(req, socket, head) {
74
- const clientId = req.headers['sec-websocket-key'];
75
- const request = {
76
- id: clientId,
77
- headers: req.headers,
78
- address: req.url || '',
79
- };
80
- const params = {
81
- head,
82
- socket,
83
- request: req,
84
- requestId: (0, pondsocket_common_1.uuid)(),
85
- };
86
- __classPrivateFieldGet(this, _PondSocket_middleware, "f").run(request, params, (error) => {
87
- if (error) {
88
- const code = (error === null || error === void 0 ? void 0 : error.statusCode) || 400;
89
- const message = (error === null || error === void 0 ? void 0 : error.message) || 'Unauthorized connection';
90
- socket.write(`HTTP/1.1 ${code} ${message}\r\n\r\n`);
91
- socket.destroy();
92
- }
93
- else if (__classPrivateFieldGet(this, _PondSocket_exclusiveServer, "f")) {
94
- socket.write('HTTP/1.1 404 Not Found\r\n\r\n');
95
- socket.destroy();
96
- }
97
- });
98
- }
99
72
  }
100
73
  exports.PondSocket = PondSocket;
101
- _PondSocket_exclusiveServer = new WeakMap(), _PondSocket_server = new WeakMap(), _PondSocket_socketServer = new WeakMap(), _PondSocket_middleware = new WeakMap(), _PondSocket_instances = new WeakSet(), _PondSocket_manageHeartbeat = function _PondSocket_manageHeartbeat() {
74
+ _PondSocket_server = new WeakMap(), _PondSocket_exclusiveServer = new WeakMap(), _PondSocket_socketServer = new WeakMap(), _PondSocket_backend = new WeakMap(), _PondSocket_middleware = new WeakMap(), _PondSocket_instances = new WeakSet(), _PondSocket_handleUpgrade = function _PondSocket_handleUpgrade(req, socket, head) {
75
+ const clientId = req.headers['sec-websocket-key'];
76
+ const request = {
77
+ id: clientId,
78
+ headers: req.headers,
79
+ address: req.url || '',
80
+ };
81
+ const params = {
82
+ head,
83
+ socket,
84
+ request: req,
85
+ requestId: (0, pondsocket_common_1.uuid)(),
86
+ };
87
+ __classPrivateFieldGet(this, _PondSocket_middleware, "f").run(request, params, (error) => {
88
+ if (error) {
89
+ const code = (error === null || error === void 0 ? void 0 : error.statusCode) || 400;
90
+ const message = (error === null || error === void 0 ? void 0 : error.message) || 'Unauthorized connection';
91
+ socket.write(`HTTP/1.1 ${code} ${message}\r\n\r\n`);
92
+ socket.destroy();
93
+ }
94
+ else if (__classPrivateFieldGet(this, _PondSocket_exclusiveServer, "f")) {
95
+ socket.write('HTTP/1.1 404 Not Found\r\n\r\n');
96
+ socket.destroy();
97
+ }
98
+ });
99
+ }, _PondSocket_manageHeartbeat = function _PondSocket_manageHeartbeat() {
102
100
  __classPrivateFieldGet(this, _PondSocket_socketServer, "f").on('connection', (socket) => {
103
101
  socket.on('pong', () => {
104
102
  socket.isAlive = true;
@@ -122,7 +120,7 @@ _PondSocket_exclusiveServer = new WeakMap(), _PondSocket_server = new WeakMap(),
122
120
  __classPrivateFieldGet(this, _PondSocket_server, "f").on('close', () => {
123
121
  clearInterval(timeout);
124
122
  });
125
- __classPrivateFieldGet(this, _PondSocket_server, "f").on('upgrade', this.handleUpgrade.bind(this));
123
+ __classPrivateFieldGet(this, _PondSocket_server, "f").on('upgrade', __classPrivateFieldGet(this, _PondSocket_instances, "m", _PondSocket_handleUpgrade).bind(this));
126
124
  }, _PondSocket_getCookies = function _PondSocket_getCookies(headers) {
127
125
  const cookieHeader = headers.cookie;
128
126
  if (!cookieHeader) {
package/types.d.ts CHANGED
@@ -1,19 +1,20 @@
1
- import { Server, ServerResponse, IncomingMessage, IncomingHttpHeaders } from 'http';
1
+ import { IncomingHttpHeaders, IncomingMessage, Server as HTTPServer, Server, ServerResponse } from 'http';
2
2
 
3
3
  import {
4
+ EventParams,
4
5
  IncomingConnection,
6
+ JoinParams,
7
+ Params,
5
8
  PondAssigns,
6
9
  PondEvent,
7
10
  PondEventMap,
8
11
  PondMessage,
9
12
  PondPath,
10
13
  PondPresence,
14
+ Unsubscribe,
15
+ UserAssigns,
11
16
  UserData,
12
17
  UserPresences,
13
- UserAssigns,
14
- JoinParams,
15
- EventParams,
16
- Params,
17
18
  } from '@eleven-am/pondsocket-common';
18
19
  import { WebSocket, WebSocketServer } from 'ws';
19
20
 
@@ -24,22 +25,126 @@ export interface LeaveEvent<EventTypes extends PondEventMap = PondEventMap, Pres
24
25
  channel: Channel<EventTypes, PresenceType, AssignType>;
25
26
  }
26
27
 
27
- export interface OutgoingEvent<Event extends string, EventTypes extends PondEventMap = PondEventMap, PresenceType extends PondPresence = PondPresence, AssignType extends PondAssigns = PondAssigns> {
28
- payload: PondMessage;
29
- event: EventParams<Event>;
30
- channel: Channel<EventTypes, PresenceType, AssignType>;
31
- }
32
-
33
28
  export type LeaveCallback<EventTypes extends PondEventMap = PondEventMap, PresenceType extends PondPresence = PondPresence, AssignType extends PondAssigns = PondAssigns> = (event: LeaveEvent<EventTypes, PresenceType, AssignType>) => void;
34
29
 
35
- export type OutgoingHandler<Event extends string, EventTypes extends PondEventMap = PondEventMap, PresenceType extends PondPresence = PondPresence, AssignType extends PondAssigns = PondAssigns> = (event: OutgoingEvent<Event, EventTypes, PresenceType, AssignType>) => PondMessage | Promise<PondMessage> | void | Promise<void>;
36
-
37
30
  export type RequestHandler<Request> = (request: Request) => void | Promise<void>;
38
31
 
32
+ export interface RedisDistributedBackendOptions {
33
+ host?: string;
34
+ port?: number;
35
+ password?: string;
36
+ database?: number;
37
+ url?: string;
38
+ keyPrefix?: string;
39
+ }
40
+
39
41
  export interface PondSocketOptions {
40
- server?: Server;
41
- exclusiveServer?: boolean;
42
+ server?: HTTPServer;
42
43
  socketServer?: WebSocketServer;
44
+ exclusiveServer?: boolean;
45
+ distributedBackend?: IDistributedBackend;
46
+ }
47
+
48
+ export enum DistributedMessageType {
49
+ STATE_REQUEST = 'STATE_REQUEST',
50
+ STATE_RESPONSE = 'STATE_RESPONSE',
51
+ USER_JOINED = 'USER_JOINED',
52
+ USER_LEFT = 'USER_LEFT',
53
+ USER_MESSAGE = 'USER_MESSAGE',
54
+ PRESENCE_UPDATE = 'PRESENCE_UPDATE',
55
+ PRESENCE_REMOVED = 'PRESENCE_REMOVED',
56
+ ASSIGNS_UPDATE = 'ASSIGNS_UPDATE',
57
+ ASSIGNS_REMOVED = 'ASSIGNS_REMOVED',
58
+ EVICT_USER = 'EVICT_USER'
59
+ }
60
+
61
+ export interface DistributedMessage {
62
+ type: DistributedMessageType;
63
+ endpointName: string;
64
+ channelName: string;
65
+ timestamp?: number;
66
+ }
67
+
68
+ export interface StateRequest extends DistributedMessage {
69
+ type: DistributedMessageType.STATE_REQUEST;
70
+ fromNode: string;
71
+ }
72
+
73
+ export interface StateResponse extends DistributedMessage {
74
+ type: DistributedMessageType.STATE_RESPONSE;
75
+ users: Array<{
76
+ id: string;
77
+ presence: PondPresence;
78
+ assigns: PondAssigns;
79
+ }>;
80
+ }
81
+
82
+ export interface UserJoined extends DistributedMessage {
83
+ type: DistributedMessageType.USER_JOINED;
84
+ userId: string;
85
+ presence: PondPresence;
86
+ assigns: PondAssigns;
87
+ }
88
+
89
+ export interface UserLeft extends DistributedMessage {
90
+ type: DistributedMessageType.USER_LEFT;
91
+ userId: string;
92
+ }
93
+
94
+ export interface UserMessage extends DistributedMessage {
95
+ type: DistributedMessageType.USER_MESSAGE;
96
+ fromUserId: string;
97
+ event: string;
98
+ payload: PondMessage;
99
+ requestId: string;
100
+ recipients: string[];
101
+ }
102
+
103
+ export interface PresenceUpdate extends DistributedMessage {
104
+ type: DistributedMessageType.PRESENCE_UPDATE;
105
+ userId: string;
106
+ presence: PondPresence;
107
+ }
108
+
109
+ export interface PresenceRemoved extends DistributedMessage {
110
+ type: DistributedMessageType.PRESENCE_REMOVED;
111
+ userId: string;
112
+ }
113
+
114
+ export interface AssignsUpdate extends DistributedMessage {
115
+ type: DistributedMessageType.ASSIGNS_UPDATE;
116
+ userId: string;
117
+ assigns: PondAssigns;
118
+ }
119
+
120
+ export interface AssignsRemoved extends DistributedMessage {
121
+ type: DistributedMessageType.ASSIGNS_REMOVED;
122
+ userId: string;
123
+ }
124
+
125
+ export interface EvictUser extends DistributedMessage {
126
+ type: DistributedMessageType.EVICT_USER;
127
+ userId: string;
128
+ reason: string;
129
+ fromNode?: string;
130
+ }
131
+
132
+ export type DistributedChannelMessage =
133
+ | StateRequest
134
+ | StateResponse
135
+ | UserJoined
136
+ | UserLeft
137
+ | UserMessage
138
+ | PresenceUpdate
139
+ | PresenceRemoved
140
+ | AssignsUpdate
141
+ | AssignsRemoved
142
+ | EvictUser;
143
+
144
+ export interface IDistributedBackend {
145
+ broadcast(endpointName: string, channelName: string, message: DistributedChannelMessage): Promise<void>;
146
+ subscribe(endpointName: string, channelName: string, handler: (message: DistributedChannelMessage) => void): Unsubscribe;
147
+ cleanup(): Promise<void>;
43
148
  }
44
149
 
45
150
  export declare class PondSocket {
@@ -130,15 +235,15 @@ export declare class PondChannel<EventType extends PondEventMap = PondEventMap,
130
235
  /**
131
236
  * @desc Handles an outgoing event, this is useful for modifying the event before it is sent to the client
132
237
  * @param {PondPath<string>} event - The event to handle
133
- * @param {OutgoingHandler} handler - The handler to execute when the event is sent
238
+ * @param {RequestHandler} handler - The handler to execute when the event is sent
134
239
  * @example
135
- * pond.onOutgoing('echo', (event) => {
240
+ * pond.handleOutgoingEvent('echo', (event) => {
136
241
  * return {
137
242
  * message: 'Hello, world!'
138
243
  * };
139
244
  * });
140
245
  */
141
- onOutgoing<Event extends string> (event: PondPath<Event>, handler: OutgoingHandler<Event, EventType, PresenceType, AssignType>): void;
246
+ handleOutgoingEvent<Event extends string> (event: PondPath<Event>, handler: RequestHandler<OutgoingContext<Event, PresenceType, AssignType>>): void;
142
247
 
143
248
  /**
144
249
  * @desc Gets a channel by name
@@ -360,7 +465,7 @@ export declare class ConnectionContext<Path extends string> {
360
465
  reply(event: string, payload: PondMessage): ConnectionContext<Path>;
361
466
  }
362
467
 
363
- export declare class JoinContext<Path extends string, EventType extends PondEventMap = PondEventMap, PresenceType extends PondPresence = PondPresence, AssignType extends PondAssigns = PondAssigns> {
468
+ export declare class BaseContext<Path extends string, PresenceType extends PondPresence = PondPresence, AssignType extends PondAssigns = PondAssigns> {
364
469
  /**
365
470
  * @desc Get the event information.
366
471
  */
@@ -376,11 +481,6 @@ export declare class JoinContext<Path extends string, EventType extends PondEven
376
481
  */
377
482
  get channel(): Channel;
378
483
 
379
- /**
380
- * @desc Get the join parameters.
381
- */
382
- get joinParams(): JoinParams;
383
-
384
484
  /**
385
485
  * @desc Get all current presences in the channel.
386
486
  */
@@ -392,9 +492,21 @@ export declare class JoinContext<Path extends string, EventType extends PondEven
392
492
  get assigns(): UserAssigns;
393
493
 
394
494
  /**
395
- * @desc Get the user data.
495
+ * @desc Get the user who sent the request.
396
496
  */
397
497
  get user(): UserData<PresenceType, AssignType>;
498
+ }
499
+
500
+ export declare class JoinContext<
501
+ Path extends string,
502
+ EventType extends PondEventMap = PondEventMap,
503
+ PresenceType extends PondPresence = PondPresence,
504
+ AssignType extends PondAssigns = PondAssigns
505
+ > extends BaseContext<Path, PresenceType, AssignType> {
506
+ /**
507
+ * @desc Get the join parameters.
508
+ */
509
+ get joinParams(): JoinParams;
398
510
 
399
511
  /**
400
512
  * @desc Checks if the server has responded to the join request.
@@ -456,37 +568,12 @@ export declare class JoinContext<Path extends string, EventType extends PondEven
456
568
  trackPresence(presence: PresenceType): JoinContext<Path, PresenceType, AssignType>;
457
569
  }
458
570
 
459
- export declare class EventContext<Path extends string, EventType extends PondEventMap = PondEventMap, PresenceType extends PondPresence = PondPresence, AssignType extends PondAssigns = PondAssigns> {
460
- /**
461
- * @desc Get the event information.
462
- */
463
- get event(): PondEvent<Path>;
464
-
465
- /**
466
- * @desc Get the channel name.
467
- */
468
- get channelName(): string;
469
-
470
- /**
471
- * @desc Get the channel instance.
472
- */
473
- get channel(): Channel;
474
-
475
- /**
476
- * @desc Get all current presences in the channel.
477
- */
478
- get presences(): UserPresences;
479
-
480
- /**
481
- * @desc Get all current assigns in the channel.
482
- */
483
- get assigns(): UserAssigns;
484
-
485
- /**
486
- * @desc Get the user who sent the request.
487
- */
488
- get user(): UserData<PresenceType, AssignType>;
489
-
571
+ export declare class EventContext<
572
+ Path extends string,
573
+ EventType extends PondEventMap = PondEventMap,
574
+ PresenceType extends PondPresence = PondPresence,
575
+ AssignType extends PondAssigns = PondAssigns
576
+ > extends BaseContext<Path, PresenceType, AssignType> {
490
577
  /**
491
578
  * @desc Assigns data to the client.
492
579
  * @param {PondAssigns} assigns - The data to assign to the client.
@@ -558,3 +645,50 @@ export declare class EventContext<Path extends string, EventType extends PondEve
558
645
  */
559
646
  evictUser(reason: string, userId?: string): EventContext<Path, EventType, PresenceType, AssignType>;
560
647
  }
648
+
649
+ export class OutgoingContext<
650
+ Path extends string,
651
+ PresenceType extends PondPresence = PondPresence,
652
+ AssignType extends PondAssigns = PondAssigns
653
+ > extends BaseContext<Path, PresenceType, AssignType> {
654
+ /**
655
+ * @desc Get the join parameters.
656
+ */
657
+ get payload(): PondMessage;
658
+
659
+ /**
660
+ * @desc Blocks the outgoing context, preventing further processing of the event.
661
+ */
662
+ block(): OutgoingContext<Path, PresenceType, AssignType>;
663
+
664
+ /**
665
+ * desc Transforms the outgoing context with a new payload.
666
+ * @param payload - The new payload to set for the context.
667
+ */
668
+ transform(payload: PondMessage): OutgoingContext<Path, PresenceType, AssignType>;
669
+ }
670
+
671
+ export declare class RedisDistributedBackend implements IDistributedBackend {
672
+ constructor(options?: RedisDistributedBackendOptions);
673
+
674
+ /**
675
+ * @desc Gets the subject for subscribing to distributed messages
676
+ * @param endpointName - The name of the endpoint to subscribe to
677
+ * @param channelName - The name of the channel to subscribe to
678
+ * @param message - The message to send
679
+ */
680
+ broadcast (endpointName: string, channelName: string, message: DistributedChannelMessage): Promise<void>;
681
+
682
+ /**
683
+ * @desc Cleans up the distributed backend, closing any connections and cleaning up resources
684
+ */
685
+ cleanup (): Promise<void>;
686
+
687
+ /**
688
+ * @desc Subscribe to messages for a specific endpoint and channel
689
+ * @param endpointName - The name of the endpoint to subscribe to
690
+ * @param channelName - The name of the channel to subscribe to
691
+ * @param handler - The handler function to call when a message is received
692
+ */
693
+ subscribe (endpointName: string, channelName: string, handler: (message: DistributedChannelMessage) => void): Unsubscribe;
694
+ }
@@ -28,7 +28,7 @@ class PondChannel {
28
28
  __classPrivateFieldGet(this, _PondChannel_lobby, "f").onLeave(callback);
29
29
  return this;
30
30
  }
31
- onOutgoing(event, handler) {
31
+ handleOutgoingEvent(event, handler) {
32
32
  __classPrivateFieldGet(this, _PondChannel_lobby, "f").handleOutgoingEvent(event, handler);
33
33
  return this;
34
34
  }