@dcl/protocol 1.0.0-3548510624.commit-7609438 → 1.0.0-3576463488.commit-bbfbde4

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.
@@ -60,9 +60,11 @@ export interface WsIdentification {
60
60
  /**
61
61
  * This message is received by the peers when the same address logs in in a
62
62
  * different session. It should signal that the client should be shut down and not
63
- * retry any new comms connection.
63
+ * retry any new comms connection. It can also be used to reject new users joining when
64
+ * the room capacity has been reached.
64
65
  */
65
66
  export interface WsKicked {
67
+ reason: string;
66
68
  }
67
69
 
68
70
  export interface WsPacket {
@@ -539,11 +541,14 @@ export const WsIdentification = {
539
541
  };
540
542
 
541
543
  function createBaseWsKicked(): WsKicked {
542
- return {};
544
+ return { reason: "" };
543
545
  }
544
546
 
545
547
  export const WsKicked = {
546
- encode(_: WsKicked, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
548
+ encode(message: WsKicked, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
549
+ if (message.reason !== "") {
550
+ writer.uint32(10).string(message.reason);
551
+ }
547
552
  return writer;
548
553
  },
549
554
 
@@ -554,6 +559,9 @@ export const WsKicked = {
554
559
  while (reader.pos < end) {
555
560
  const tag = reader.uint32();
556
561
  switch (tag >>> 3) {
562
+ case 1:
563
+ message.reason = reader.string();
564
+ break;
557
565
  default:
558
566
  reader.skipType(tag & 7);
559
567
  break;
@@ -562,17 +570,19 @@ export const WsKicked = {
562
570
  return message;
563
571
  },
564
572
 
565
- fromJSON(_: any): WsKicked {
566
- return {};
573
+ fromJSON(object: any): WsKicked {
574
+ return { reason: isSet(object.reason) ? String(object.reason) : "" };
567
575
  },
568
576
 
569
- toJSON(_: WsKicked): unknown {
577
+ toJSON(message: WsKicked): unknown {
570
578
  const obj: any = {};
579
+ message.reason !== undefined && (obj.reason = message.reason);
571
580
  return obj;
572
581
  },
573
582
 
574
- fromPartial<I extends Exact<DeepPartial<WsKicked>, I>>(_: I): WsKicked {
583
+ fromPartial<I extends Exact<DeepPartial<WsKicked>, I>>(object: I): WsKicked {
575
584
  const message = createBaseWsKicked();
585
+ message.reason = object.reason ?? "";
576
586
  return message;
577
587
  },
578
588
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/protocol",
3
- "version": "1.0.0-3548510624.commit-7609438",
3
+ "version": "1.0.0-3576463488.commit-bbfbde4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -25,5 +25,5 @@
25
25
  "out-ts",
26
26
  "public"
27
27
  ],
28
- "commit": "76094383a937de0d402c19a621bfcd26a4b834be"
28
+ "commit": "bbfbde471eb830d5adab4ec50670e73e0a94951d"
29
29
  }
@@ -68,9 +68,12 @@ message WsIdentification {
68
68
  /**
69
69
  * This message is received by the peers when the same address logs in in a
70
70
  * different session. It should signal that the client should be shut down and not
71
- * retry any new comms connection.
71
+ * retry any new comms connection. It can also be used to reject new users joining when
72
+ * the room capacity has been reached.
72
73
  */
73
- message WsKicked {}
74
+ message WsKicked {
75
+ string reason = 1;
76
+ }
74
77
 
75
78
  message WsPacket {
76
79
  oneof message {
@@ -98,4 +101,4 @@ message WsPacket {
98
101
  // direction: server->client
99
102
  WsKicked peer_kicked = 8;
100
103
  }
101
- }
104
+ }