@netifyjs/protocol 1.0.0-alpha.3 → 1.0.0-beta.1

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.
Files changed (175) hide show
  1. package/package.json +2 -2
  2. package/src/codec/index.ts +51 -221
  3. package/src/dispatch/dispatcher/index.ts +89 -47
  4. package/src/dispatch/session/index.ts +6 -24
  5. package/src/index.ts +2 -4
  6. package/src/photon/balancing/codec/index.ts +27 -53
  7. package/src/photon/balancing/format/authenticate/request/index.ts +52 -6
  8. package/src/photon/balancing/format/friends/request/index.ts +21 -5
  9. package/src/photon/balancing/format/game/create/request/index.ts +45 -8
  10. package/src/photon/balancing/format/game/debug/request/index.ts +19 -4
  11. package/src/photon/balancing/format/game/join/request/index.ts +65 -13
  12. package/src/photon/balancing/format/game/list/request/index.ts +29 -3
  13. package/src/photon/balancing/format/game/random/request/index.ts +58 -10
  14. package/src/photon/balancing/format/groups/request/index.ts +19 -3
  15. package/src/photon/balancing/format/index.ts +7 -0
  16. package/src/photon/balancing/format/leave/request/index.ts +19 -3
  17. package/src/photon/balancing/format/lobby/join/request/index.ts +23 -3
  18. package/src/photon/balancing/format/lobby/stats/request/index.ts +19 -3
  19. package/src/photon/balancing/format/once/request/index.ts +31 -8
  20. package/src/photon/balancing/format/properties/get/request/index.ts +31 -4
  21. package/src/photon/balancing/format/properties/set/request/index.ts +36 -7
  22. package/src/photon/balancing/format/raise/request/index.ts +76 -10
  23. package/src/photon/balancing/format/reader/index.ts +75 -6
  24. package/src/photon/balancing/format/regions/request/index.ts +16 -1
  25. package/src/photon/balancing/format/rpc/request/index.ts +26 -3
  26. package/src/photon/balancing/format/settings/request/index.ts +15 -2
  27. package/src/photon/balancing/format/shared/credentials/index.ts +77 -33
  28. package/src/photon/balancing/format/shared/lobby/index.ts +41 -5
  29. package/src/photon/balancing/format/shared/options/index.ts +56 -24
  30. package/src/photon/balancing/format/table/index.ts +399 -0
  31. package/src/photon/balancing/index.ts +11 -1
  32. package/src/photon/balancing/travel/index.ts +15 -12
  33. package/src/photon/client/connection/index.ts +6 -6
  34. package/src/photon/cluster/back/index.ts +32 -45
  35. package/src/photon/cluster/dresser/index.ts +7 -8
  36. package/src/photon/cluster/front/index.ts +25 -49
  37. package/src/photon/cluster/grid/index.ts +1 -1
  38. package/src/photon/cluster/mover/index.ts +12 -12
  39. package/src/photon/cluster/press/index.ts +2 -18
  40. package/src/photon/cluster/route/game/index.ts +9 -11
  41. package/src/photon/cluster/route/master/index.ts +15 -34
  42. package/src/photon/cluster/route/name/index.ts +4 -21
  43. package/src/photon/cluster/seat/game/index.ts +6 -26
  44. package/src/photon/cluster/seat/master/index.ts +1 -1
  45. package/src/photon/cluster/sessions/index.ts +5 -6
  46. package/src/photon/cluster/spread/index.ts +8 -147
  47. package/src/photon/enet/client/index.ts +1 -8
  48. package/src/photon/enet/gateway/index.ts +5 -15
  49. package/src/photon/enet/index.ts +1 -1
  50. package/src/photon/enet/link/index.ts +34 -15
  51. package/src/photon/enet/outbound/index.ts +279 -0
  52. package/src/photon/enet/peer/index.ts +59 -0
  53. package/src/photon/enet/transport/index.ts +8 -24
  54. package/src/photon/game/admission/index.ts +353 -0
  55. package/src/photon/game/bag/index.ts +13 -0
  56. package/src/photon/game/broadcast/index.ts +79 -0
  57. package/src/photon/game/editor/index.ts +446 -0
  58. package/src/photon/game/gate/index.ts +9 -8
  59. package/src/photon/game/handler/index.ts +30 -3
  60. package/src/photon/game/history/index.ts +234 -0
  61. package/src/photon/game/hooked/index.ts +16 -15
  62. package/src/photon/game/index.ts +12 -1
  63. package/src/photon/game/lifecycle/index.ts +193 -0
  64. package/src/photon/game/peer/index.ts +1 -10
  65. package/src/photon/game/properties/index.ts +342 -0
  66. package/src/photon/game/room/index.ts +435 -1793
  67. package/src/photon/game/rooms/index.ts +2 -1
  68. package/src/photon/game/seats/index.ts +237 -0
  69. package/src/photon/game/server/index.ts +12 -2
  70. package/src/photon/game/services/index.ts +41 -0
  71. package/src/photon/game/settings/index.ts +22 -0
  72. package/src/photon/game/snapshot/index.ts +133 -0
  73. package/src/photon/game/throttle/index.ts +60 -0
  74. package/src/photon/game/touch/index.ts +2 -5
  75. package/src/photon/game/venue/index.ts +31 -0
  76. package/src/photon/master/application/index.ts +7 -0
  77. package/src/photon/master/gate/index.ts +12 -8
  78. package/src/photon/master/handler/index.ts +36 -748
  79. package/src/photon/master/index.ts +5 -0
  80. package/src/photon/master/list/sql/index.ts +37 -3
  81. package/src/photon/master/listing/index.ts +133 -0
  82. package/src/photon/master/lobby/index.ts +9 -0
  83. package/src/photon/master/login/index.ts +424 -0
  84. package/src/photon/master/matchmaking/index.ts +282 -0
  85. package/src/photon/master/query/index.ts +45 -0
  86. package/src/photon/master/redirect/index.ts +8 -7
  87. package/src/photon/master/services/index.ts +35 -0
  88. package/src/photon/master/settings/index.ts +44 -0
  89. package/src/photon/master/sql/cost/index.ts +263 -0
  90. package/src/photon/master/sql/index.ts +1 -0
  91. package/src/photon/message/client/index.ts +14 -11
  92. package/src/photon/message/handler/index.ts +22 -64
  93. package/src/photon/message/pipeline/index.ts +12 -12
  94. package/src/photon/message/server/index.ts +87 -43
  95. package/src/photon/message/watch/index.ts +14 -37
  96. package/src/photon/server/deferral/index.ts +57 -0
  97. package/src/photon/server/host/index.ts +32 -10
  98. package/src/photon/server/index.ts +1 -0
  99. package/src/photon/tcp/client/index.ts +1 -1
  100. package/src/photon/tcp/codec/index.ts +13 -42
  101. package/src/photon/tcp/server/index.ts +4 -4
  102. package/src/photon/websocket/bridge/index.ts +16 -20
  103. package/src/photon/websocket/message/index.ts +27 -39
  104. package/src/photon/websocket/path/index.ts +2 -5
  105. package/src/scale/fanout/index.ts +6 -6
  106. package/src/scale/index.ts +2 -4
  107. package/src/scale/outbound/index.ts +192 -0
  108. package/src/scale/relay/index.ts +20 -31
  109. package/src/scale/sink/index.ts +6 -11
  110. package/src/scale/transport/index.ts +27 -44
  111. package/src/scale/tunnel/index.ts +37 -91
  112. package/src/smartfox/common/bluebox/gateway/index.ts +401 -0
  113. package/src/smartfox/common/bluebox/index.ts +4 -0
  114. package/src/smartfox/{x2 → common}/bluebox/transport/index.ts +36 -23
  115. package/src/smartfox/common/index.ts +5 -0
  116. package/src/smartfox/common/strikes/index.ts +74 -0
  117. package/src/smartfox/pro/bluebox/index.ts +176 -4
  118. package/src/smartfox/pro/codec/index.ts +8 -7
  119. package/src/smartfox/pro/escalation/index.ts +28 -20
  120. package/src/smartfox/pro/flood/index.ts +2 -2
  121. package/src/smartfox/pro/format/extension/raw/index.ts +12 -2
  122. package/src/smartfox/pro/handler/chat/index.ts +11 -8
  123. package/src/smartfox/pro/handler/login/index.ts +2 -25
  124. package/src/smartfox/pro/handler/shared/index.ts +4 -3
  125. package/src/smartfox/pro/index.ts +11 -5
  126. package/src/smartfox/pro/login/gate/index.ts +166 -0
  127. package/src/smartfox/pro/login/index.ts +1 -0
  128. package/src/smartfox/pro/moderation/index.ts +220 -0
  129. package/src/smartfox/pro/options/index.ts +5 -5
  130. package/src/smartfox/pro/protocol/index.ts +62 -8
  131. package/src/smartfox/pro/web/index.ts +33 -26
  132. package/src/smartfox/pro/zone/index.ts +59 -282
  133. package/src/smartfox/pro/zones/index.ts +3 -3
  134. package/src/smartfox/x2/bluebox/index.ts +149 -4
  135. package/src/smartfox/x2/chat/index.ts +9 -19
  136. package/src/smartfox/x2/codec/index.ts +31 -39
  137. package/src/smartfox/x2/config/index.ts +6 -1
  138. package/src/smartfox/x2/data/array/index.ts +96 -60
  139. package/src/smartfox/x2/data/object/index.ts +144 -82
  140. package/src/smartfox/x2/data/serializer/index.ts +41 -23
  141. package/src/smartfox/x2/flood/gate/index.ts +19 -13
  142. package/src/smartfox/x2/format/buddy/init/response/index.ts +4 -3
  143. package/src/smartfox/x2/format/find/rooms/response/index.ts +4 -3
  144. package/src/smartfox/x2/format/find/users/response/index.ts +4 -3
  145. package/src/smartfox/x2/format/group/subscribe/response/index.ts +4 -3
  146. package/src/smartfox/x2/format/login/response/index.ts +4 -3
  147. package/src/smartfox/x2/format/mmo/position/response/index.ts +8 -6
  148. package/src/smartfox/x2/format/room/join/response/index.ts +4 -3
  149. package/src/smartfox/x2/games/index.ts +35 -8
  150. package/src/smartfox/x2/hall/index.ts +0 -6
  151. package/src/smartfox/x2/handler/session/index.ts +1 -1
  152. package/src/smartfox/x2/index.ts +8 -3
  153. package/src/smartfox/x2/member/index.ts +10 -3
  154. package/src/smartfox/x2/packet/login/response/index.ts +12 -0
  155. package/src/smartfox/x2/protocol/index.ts +11 -1
  156. package/src/smartfox/x2/rooms/index.ts +1 -2
  157. package/src/smartfox/x2/sessions/index.ts +6 -0
  158. package/src/smartfox/x2/udp/index.ts +61 -24
  159. package/src/smartfox/x2/web/index.ts +35 -17
  160. package/src/smartfox/x2/websocket/index.ts +18 -36
  161. package/src/smartfox/x2/zone/index.ts +77 -28
  162. package/src/smartfox/x2/zones/index.ts +17 -5
  163. package/src/photon/enet/handler/index.ts +0 -65
  164. package/src/scale/hosted/index.ts +0 -68
  165. package/src/scale/outlet/index.ts +0 -121
  166. package/src/smartfox/pro/bluebox/gateway/index.ts +0 -310
  167. package/src/smartfox/pro/bluebox/session/index.ts +0 -63
  168. package/src/smartfox/pro/bluebox/transport/index.ts +0 -104
  169. package/src/smartfox/x2/bluebox/gateway/index.ts +0 -315
  170. /package/src/smartfox/{x2 → common}/bluebox/session/index.ts +0 -0
  171. /package/src/smartfox/{pro → common}/counters/index.ts +0 -0
  172. /package/src/smartfox/{pro → common}/counters/memory/index.ts +0 -0
  173. /package/src/smartfox/{pro → common}/counters/offender/index.ts +0 -0
  174. /package/src/smartfox/{pro → common}/counters/store/index.ts +0 -0
  175. /package/src/smartfox/{pro → common}/sequence/index.ts +0 -0
@@ -1,20 +1,6 @@
1
1
  import type { Transport } from '@netifyjs/netify'
2
2
 
3
- /**
4
- * What a moved session's transport tells the tunnel
5
- */
6
- export type TransportEvents = {
7
- /**
8
- * The session wrote bytes
9
- * @param bytes a borrowed view of what was written
10
- */
11
- wrote(bytes: Uint8Array): void
12
-
13
- /**
14
- * The session hung up
15
- */
16
- ended(): void
17
- }
3
+ import type { TunnelSink } from '../outbound/index.ts'
18
4
 
19
5
  /**
20
6
  * Stands in for the socket of a session whose client is on another shard
@@ -22,91 +8,88 @@ export type TransportEvents = {
22
8
  */
23
9
  export class TunnelTransport implements Transport {
24
10
  /**
25
- * Never a datagram socket
26
- */
27
- public readonly datagram: boolean = false
28
-
29
- /**
30
- * Where the client connected from
11
+ * The client's address on its own shard
31
12
  */
32
13
  public readonly remoteAddress: string
33
14
 
34
15
  /**
35
- * Port the client connected from
16
+ * The client's port on its own shard
36
17
  */
37
18
  public readonly remotePort: number
38
19
 
39
20
  /**
40
- * Whether either end hung up
21
+ * Whether the session is over
41
22
  */
42
23
  public ended: boolean
43
24
 
44
25
  /**
45
- * Whether the session asked for reads to stop
26
+ * Where frames go
46
27
  */
47
- public paused: boolean
28
+ private readonly sink: TunnelSink
48
29
 
49
30
  /**
50
- * Hears what the session does
31
+ * Hears that the session ended here
51
32
  */
52
- private readonly events: TransportEvents
33
+ private readonly over: () => void
53
34
 
54
35
  /**
55
- * @param remoteAddress where the client connected from
56
- * @param remotePort port the client connected from
57
- * @param events hears what the session does
36
+ * @param remoteAddress the client's address on its own shard
37
+ * @param remotePort the client's port on its own shard
38
+ * @param sink where frames go
39
+ * @param over hears that the session ended here
58
40
  */
59
41
  public constructor(
60
42
  remoteAddress: string,
61
43
  remotePort: number,
62
- events: TransportEvents,
44
+ sink: TunnelSink,
45
+ over: () => void,
63
46
  ) {
64
47
  this.remoteAddress = remoteAddress
65
48
  this.remotePort = remotePort
66
- this.events = events
49
+ this.sink = sink
50
+ this.over = over
67
51
  this.ended = false
68
- this.paused = false
69
52
  }
70
53
 
71
54
  /**
72
- * Sends bytes towards the client
73
- * @param bytes what the session wrote
55
+ * Hands bytes to the client's shard
56
+ * @param bytes one or more whole frames
74
57
  */
75
58
  public write(bytes: Uint8Array): number {
76
59
  if (this.ended) return -1
77
60
 
78
- this.events.wrote(bytes)
61
+ this.sink(bytes, 0, bytes.length)
79
62
  return bytes.length
80
63
  }
81
64
 
82
65
  /**
83
- * Tells the client's shard to hang up
66
+ * Ends the session and tells the client's shard
84
67
  */
85
68
  public end(): void {
86
69
  if (this.ended) return
87
70
 
88
71
  this.ended = true
89
- this.events.ended()
72
+ this.over()
90
73
  }
91
74
 
92
75
  /**
93
- * Stops writes after the client went away
76
+ * Ends the session without telling anyone
94
77
  */
95
78
  public cut(): void {
96
79
  this.ended = true
97
80
  }
98
81
 
99
82
  /**
100
- * Notes that the session asked for reads to stop
83
+ * Can't stop the other shard, so the channel holds reads back itself
101
84
  */
102
- public pause(): void {
103
- this.paused = true
85
+ public pause(): boolean {
86
+ return false
104
87
  }
105
88
 
106
89
  /**
107
- * Notes that the session takes reads again
90
+ * Nothing to resume
108
91
  */
109
92
  public resume(): void {
110
- this.paused = false
93
+ return
111
94
  }
112
95
  }
@@ -1,17 +1,15 @@
1
1
  import {
2
- AttributeKey,
3
2
  ByteBuf,
3
+ Channel,
4
4
  ShutdownEvent,
5
- type Channel,
6
- type ChannelHandler,
7
5
  type ChannelSetup,
8
6
  type Logger,
9
7
  } from '@netifyjs/netify'
10
8
 
9
+ import { Session } from '../../dispatch/session/index.ts'
11
10
  import { Batch, type BatchVisitor } from '../batch/index.ts'
12
11
  import { Courier } from '../courier/index.ts'
13
- import { HostedChannel } from '../hosted/index.ts'
14
- import { type OutletSink, TunnelOutlet } from '../outlet/index.ts'
12
+ import { TunnelOutbound, type TunnelSink } from '../outbound/index.ts'
15
13
  import { Pending } from '../pending/index.ts'
16
14
  import type { Portable, Reach } from '../portable/index.ts'
17
15
  import { TunnelRelay } from '../relay/index.ts'
@@ -37,7 +35,7 @@ export type TunnelOptions<S> = {
37
35
  readonly setup: ChannelSetup | null
38
36
 
39
37
  /**
40
- * Hears about sessions that failed to start
38
+ * Where moved sessions log
41
39
  */
42
40
  readonly logger: Logger
43
41
  }
@@ -152,12 +150,6 @@ type Stopping = readonly [id: number, deadline: number]
152
150
  * @class
153
151
  */
154
152
  export class Tunnel<S = unknown> {
155
- /**
156
- * Marks a connection whose client is on another shard
157
- */
158
- private static readonly hosted: AttributeKey<boolean> =
159
- new AttributeKey<boolean>('netify:protocol:scale:hosted')
160
-
161
153
  /**
162
154
  * Bytes a session id takes in front of a payload
163
155
  */
@@ -179,7 +171,7 @@ export class Tunnel<S = unknown> {
179
171
  private readonly setup: ChannelSetup | null
180
172
 
181
173
  /**
182
- * Hears about sessions that failed to start
174
+ * Where moved sessions log
183
175
  */
184
176
  private readonly logger: Logger
185
177
 
@@ -203,16 +195,6 @@ export class Tunnel<S = unknown> {
203
195
  */
204
196
  private readonly lost: (shard: number) => void
205
197
 
206
- /**
207
- * Clients with broadcast bytes waiting to leave
208
- */
209
- private readonly touched: Set<Channel>
210
-
211
- /**
212
- * Sends the broadcast bytes that wait
213
- */
214
- private readonly flusher: () => void
215
-
216
198
  /**
217
199
  * Replies waiting to go back to the clients' shards
218
200
  */
@@ -253,12 +235,6 @@ export class Tunnel<S = unknown> {
253
235
  this.lost = (shard: number): void => {
254
236
  this.abandon(shard)
255
237
  }
256
- this.touched = new Set<Channel>()
257
- this.flusher = (): void => {
258
- for (const channel of this.touched) channel.flushEncoded()
259
-
260
- this.touched.clear()
261
- }
262
238
  this.downs = Pending.of(
263
239
  this.courier,
264
240
  'down',
@@ -291,16 +267,7 @@ export class Tunnel<S = unknown> {
291
267
  const guest = this.guests.get(from)?.get(id)
292
268
  if (guest === undefined) return
293
269
 
294
- void guest.channel.handleMessage(
295
- new ByteBuf(
296
- bytes,
297
- size,
298
- ByteBuf.defaultMaxCapacity,
299
- start,
300
- start + size,
301
- ),
302
- size,
303
- )
270
+ guest.channel.receiveBytes(bytes.slice(start, start + size))
304
271
  }
305
272
 
306
273
  this.courier
@@ -341,14 +308,6 @@ export class Tunnel<S = unknown> {
341
308
  return new Tunnel<S>(options)
342
309
  }
343
310
 
344
- /**
345
- * Whether a connection's client is on another shard
346
- * @param channel the connection handlers see
347
- */
348
- public static carries(channel: Channel): boolean {
349
- return channel.attributes.get<boolean>(Tunnel.hosted) === true
350
- }
351
-
352
311
  /**
353
312
  * Hands a client's session to another shard
354
313
  * @param channel the client's connection
@@ -402,9 +361,9 @@ export class Tunnel<S = unknown> {
402
361
  pipeline.addLast<TunnelRelay>(this.courier.topic('relay'), relay)
403
362
 
404
363
  for (const name of pipeline.names().reverse()) {
405
- const handler = pipeline.get<ChannelHandler>(name)
364
+ const handler = pipeline.get(name)
406
365
  if (handler === null || handler === relay) continue
407
- if (this.portable.retires(handler)) pipeline.remove<ChannelHandler>(name)
366
+ if (this.portable.retires(handler)) pipeline.remove(name)
408
367
  }
409
368
  }
410
369
 
@@ -515,23 +474,7 @@ export class Tunnel<S = unknown> {
515
474
  return
516
475
  }
517
476
 
518
- const transport = new TunnelTransport(opening.address, opening.port, {
519
- /**
520
- * Sends what bypassed the pipeline
521
- * @param bytes what the session wrote
522
- */
523
- wrote: (bytes: Uint8Array): void => {
524
- this.downs.hold(from, opening.id, bytes, 0, bytes.length)
525
- },
526
- /**
527
- * Ends the session with its connection
528
- */
529
- ended: (): void => {
530
- this.forget(guest)
531
- this.courier.tell(from, 'end', opening.id)
532
- },
533
- })
534
- const sink: OutletSink = (
477
+ const sink: TunnelSink = (
535
478
  source: Uint8Array,
536
479
  start: number,
537
480
  size: number,
@@ -540,7 +483,25 @@ export class Tunnel<S = unknown> {
540
483
  this.downs.hold(from, opening.id, source, start, size)
541
484
  }
542
485
  }
543
- const channel = new HostedChannel(transport, sink)
486
+ const transport = new TunnelTransport(
487
+ opening.address,
488
+ opening.port,
489
+ sink,
490
+ (): void => {
491
+ this.forget(guest)
492
+ this.courier.tell(from, 'end', opening.id)
493
+ },
494
+ )
495
+ const channel = new Channel(transport, {
496
+ /**
497
+ * Where the session logs
498
+ */
499
+ logger: this.logger,
500
+ /**
501
+ * Hands frames to the client's shard without a socket buffer
502
+ */
503
+ outbound: TunnelOutbound.factory(sink),
504
+ })
544
505
  const guest: Hosted = {
545
506
  front: from,
546
507
  id: opening.id,
@@ -553,23 +514,14 @@ export class Tunnel<S = unknown> {
553
514
  guests.set(opening.id, guest)
554
515
  this.guests.set(from, guests)
555
516
  this.hosts.set(channel, guest)
556
- channel.attributes.set<boolean>(Tunnel.hosted, true)
517
+ Session.of(channel).moved = true
557
518
  this.courier.tell(from, 'opened', opening.id)
558
519
 
559
- channel
560
- .activate(async (fresh: Channel): Promise<void> => {
561
- await setup(fresh)
562
- fresh.pipeline.addFirst<TunnelOutlet>(
563
- this.courier.topic('outlet'),
564
- new TunnelOutlet(sink),
565
- )
566
- this.portable.adopt(fresh, opening.state)
567
- })
568
- .catch((err: unknown): void => {
569
- this.logger.warn({ err }, 'Session failed to start')
570
- this.evict(guest, true)
571
- })
572
- void channel.handleData(opening.bytes)
520
+ channel.activate((fresh: Channel): void => {
521
+ setup(fresh)
522
+ this.portable.adopt(fresh, opening.state)
523
+ })
524
+ channel.receiveBytes(opening.bytes)
573
525
  }
574
526
 
575
527
  /**
@@ -685,10 +637,7 @@ export class Tunnel<S = unknown> {
685
637
  * @param bytes whole frames
686
638
  */
687
639
  private share(channel: Channel, bytes: Uint8Array): void {
688
- if (this.touched.size === 0) queueMicrotask(this.flusher)
689
-
690
- channel.writeEncodedSync(bytes)
691
- this.touched.add(channel)
640
+ channel.send(ByteBuf.wrap(bytes))
692
641
  }
693
642
 
694
643
  /**
@@ -699,10 +648,7 @@ export class Tunnel<S = unknown> {
699
648
  private warn(guest: Hosted | undefined, deadline: number): void {
700
649
  if (guest === undefined) return
701
650
 
702
- const channel = guest.channel
703
- void channel.execute((): Promise<void> =>
704
- channel.pipeline.fireUserEventTriggered(new ShutdownEvent(deadline)),
705
- )
651
+ guest.channel.pipeline.fireUserEventTriggered(new ShutdownEvent(deadline))
706
652
  }
707
653
 
708
654
  /**
@@ -731,7 +677,7 @@ export class Tunnel<S = unknown> {
731
677
  guest.transport.cut()
732
678
  if (notify) this.courier.tell(guest.front, 'end', guest.id)
733
679
 
734
- void guest.channel.handleClose()
680
+ guest.channel.ended()
735
681
  }
736
682
 
737
683
  /**