feat: implement session management methods#34
Merged
joaquinbejar merged 1 commit intomainfrom Mar 7, 2026
Merged
Conversation
Implement WebSocket-specific session management methods: - set_heartbeat(interval): Enable heartbeats with specified interval (10-3600 seconds) - disable_heartbeat(): Disable heartbeat messages - hello(client_name, client_version): Send client identification to server Changes: - Add PUBLIC_SET_HEARTBEAT, PUBLIC_DISABLE_HEARTBEAT constants - Add request builder methods for session management - Implement client methods with proper error handling - Add 8 unit tests for request builders Closes #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implement WebSocket-specific session management methods as specified in issue #14.
Changes
New Methods on
DeribitWebSocketClientFiles Modified
src/constants.rs: AddedPUBLIC_SET_HEARTBEAT,PUBLIC_DISABLE_HEARTBEATconstantssrc/message/request.rs: Added request builder methods with documentationsrc/client.rs: Implemented client methods with proper error handlingtests/unit/message.rs: Added 8 unit tests for request buildersAPI Methods
set_heartbeat(interval)public/set_heartbeatdisable_heartbeat()public/disable_heartbeathello(name, version)public/helloTesting
make lint-fix✓make pre-push✓Closes #14