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
* feat: add cookies
* refactor: rework cookie system
* refactor: rename variables for clarity
* refactor: use sync.Map and update to 1.21.5
* refactor: enhance cookie handling and viewer context management
- Introduced context support in the Viewer interface for better management of player connections.
- Updated cookie storage and request handling to include validation for player protocol and state.
- Replaced deprecated methods with new implementations for improved clarity and functionality.
- Enhanced event handling for cookie responses, allowing for more robust interaction with client requests.
- Removed obsolete cookie handling code to streamline the system.
* feat: implement cookie storage and request handling
- Added StoreCookie and RequestCookie RPC methods to the GateService for managing cookies on players' clients.
- Introduced corresponding request and response message types for cookie operations in the API.
- Updated documentation to reflect new cookie handling features.
- Enhanced event handling for cookie requests and storage, ensuring proper player context management.
* add test and format code
---------
Co-authored-by: BorisP1234 <borispieneman@yahoo.com>
Co-authored-by: Boris <132673559+BorisP1234@users.noreply.github.com>
@@ -287,6 +349,8 @@ All methods follow standard gRPC error codes and include detailed error messages
287
349
| UnregisterServer |[UnregisterServerRequest](#minekube-gate-v1-UnregisterServerRequest)|[UnregisterServerResponse](#minekube-gate-v1-UnregisterServerResponse)| UnregisterServer removes a server from the proxy. Returns NOT_FOUND if no matching server is found. Returns INVALID_ARGUMENT if neither name nor address is provided. |
288
350
| ConnectPlayer |[ConnectPlayerRequest](#minekube-gate-v1-ConnectPlayerRequest)|[ConnectPlayerResponse](#minekube-gate-v1-ConnectPlayerResponse)| ConnectPlayer connects a player to a specified server. Returns NOT_FOUND if either the player or target server doesn't exist. Returns FAILED_PRECONDITION if the connection attempt fails. |
289
351
| DisconnectPlayer |[DisconnectPlayerRequest](#minekube-gate-v1-DisconnectPlayerRequest)|[DisconnectPlayerResponse](#minekube-gate-v1-DisconnectPlayerResponse)| DisconnectPlayer disconnects a player from the proxy. Returns NOT_FOUND if the player doesn't exist. Returns INVALID_ARGUMENT if the reason text is malformed. |
352
+
| StoreCookie |[StoreCookieRequest](#minekube-gate-v1-StoreCookieRequest)|[StoreCookieResponse](#minekube-gate-v1-StoreCookieResponse)| StoreCookie stores a cookie on a player's client. Returns NOT_FOUND if the player doesn't exist. Passing an empty payload will remove the cookie. |
353
+
| RequestCookie |[RequestCookieRequest](#minekube-gate-v1-RequestCookieRequest)|[RequestCookieResponse](#minekube-gate-v1-RequestCookieResponse)| RequestCookie requests a cookie from a player's client. The payload in RequestCookieResponse may be empty if the cookie is not found. |
0 commit comments