You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 15, 2025. It is now read-only.
-[3.2.3.3 Service channels](#3233-service-channels)
35
35
-[3.2.3.4 New session event](#3234-new-session-event)
36
36
-[3.2.3.5 Actor certificate invalidation event](#3235-actor-certificate-invalidation-event)
37
-
-[3.2.3.6 Resume event](#3236-resume-event)
37
+
-[3.2.3.6 "Resume" event and "resumed" event](#3236-resume-event-and-resumed-event)
38
38
-[3.2.3.7 Server certificate change event](#3237-server-certificate-change-event)
39
39
-[3.2.3.8 Heartbeat and heartbeat ACK events](#3238-heartbeat-and-heartbeat-ack-events)
40
40
-[3.2.4 Establishing a connection](#324-establishing-a-connection)
@@ -271,11 +271,12 @@ The following opcodes are defined by the `core` namespace:
271
271
|`2`| Identify | Actor Send | Identify to the server. |
272
272
|`3`| New Session | Actor Receive | Received by all sessions except the new one. |
273
273
|`4`| Actor Certificate Invalidation | Actor Send/Receive | An actor certificate has been invalidated. Sent *to* server when an actor invalidates one of their certificates. |
274
-
|`5`| Resume | Actor Send/Receive | Replay events after re-connecting.|
274
+
|`5`| Resume | Actor Send| Request the replaying events after re-connecting.|
275
275
|`6`| Server Certificate Change | Actor Receive | Received when the server's certificate changed. |
276
276
|`7`| Heartbeat ACK | Actor Receive | Acknowledgement of a heartbeat |
277
277
|`8`| Service Channel | Actor Send/Receive | Open or close a service channel. |
278
278
|`9`| Service Channel ACK | Actor Receive | Acknowledgement of a service channel event. |
279
+
|`10`| Resumed | Actor Receive | Replayed events. |
279
280
280
281
##### 3.2.1.3 Sequence numbers `s`
281
282
@@ -479,12 +480,94 @@ occurs.
479
480
|`invalidSince`| uint64 | UNIX timestamp of the point in time where this ID-Cert became invalid on |
480
481
|`signature`| string | Signature of a string concatenation of the `invalidSince` timestamp and the `serial` number, in that order. Clients must verify this signature, verifying that the signature was generated by the private key of the revoked certificate. |
481
482
482
-
##### 3.2.3.6 Resume event
483
+
##### 3.2.3.6 "Resume" event and "resumed" event
483
484
484
485
When a client re-connects to a polyproto WebSocket gateway server, the client may send a resume event
485
-
to the server instead of identifying.
486
+
to the server instead of identifying. The resumed event sent by the server informs the client
487
+
about everything the client has missed since their last active connection to the gateway.
|`4000`| Unknown error | An unknown error has occurred and the connection was terminated. | x | x | x |
614
-
|`4001`| Unknown opcode | The client has sent a message with an unknown [opcode](#3212-opcodes-op) to the server. | x | x ||
615
-
|`4002`| Invalid payload | The client has sent a message with an invalid payload to the server. | x | x ||
616
-
|`4003`| Not authenticated | The server has received a message from the client before the client identified itself, or the clients' session has been invalidated. || x ||
617
-
|`4004`| Invalid authentication | The authentication token received by the server as part of the identify payload is invalid. || x ||
618
-
|`4005`| Already authenticated | The client has sent an identify payload even though it has already identified successfully. || x ||
619
-
|`4006`| Reserved | 4006 is a reserved value and has no function in polyproto v1.0. The specific meaning may be defined in the future. ||||
620
-
|`4007`| Invalid sequence number(s) | The client has sent a heartbeat containing sequence numbers that were invalid. | x | x ||
621
-
|`4008`| Rate limited | The client has sent payloads too quickly. || x ||
622
-
|`4009`| Timeout | The session has been deemed to be timed out. This can happen if a heartbeat or heartbeat ACK has not been sent in due time. | x (If sent by server) | X | x |
623
-
624
-
TODO
694
+
| Code | Description | Explanation | Eligible for `RESUME`? | Sent by server? | Sent by client? |
|`4000`| Unknown error | An unknown error has occurred and the connection was terminated. | x | x | x |
697
+
|`4001`| Unknown opcode | The client has sent a message with an unknown [opcode](#3212-opcodes-op) to the server. | x | x ||
698
+
|`4002`| Invalid payload | The client has sent a message with an invalid payload to the server. | x | x ||
699
+
|`4003`| Not authenticated | The server has received a message from the client before the client identified itself, or the clients' session has been invalidated. || x ||
700
+
|`4004`| Invalid authentication | The authentication token received by the server as part of the identify payload is invalid. || x ||
701
+
|`4005`| Already authenticated | The client has sent an identify payload even though it has already identified successfully. || x ||
702
+
|`4006`| Reserved | 4006 is a reserved value and has no function in polyproto v1.0. The specific meaning may be defined in the future. ||||
703
+
|`4007`| Invalid sequence number(s) | The client has sent a heartbeat containing sequence numbers that were invalid. | x | x ||
704
+
|`4008`| Rate limited | The client has sent payloads too quickly. || x ||
705
+
|`4009`| Timeout | The session has been deemed to be timed out. This can happen if a heartbeat or heartbeat ACK has not been sent in due time. | x (If sent by server) | x | x |
706
+
|`4010`| Unresumeable | The server has determined that this session cannot be resumed. The client should initiate a new, fresh connection to the gateway instead. || x ||
625
707
626
708
#### 3.2.6 Guaranteed delivery of gateway messages through package acknowledgement
0 commit comments