Skip to content

feat: Added websocket optional config#49

Merged
0x676e67 merged 4 commits intomainfrom
feat
Feb 21, 2025
Merged

feat: Added websocket optional config#49
0x676e67 merged 4 commits intomainfrom
feat

Conversation

@0x676e67
Copy link
Copy Markdown
Owner

@0x676e67 0x676e67 commented Feb 21, 2025

This pull request includes several enhancements to the WebSocket configuration in the src/client.rs and src/param/websocket.rs files. The changes focus on adding new configuration options for WebSocket parameters and ensuring they are properly applied during WebSocket requests.

Enhancements to WebSocket configuration:

  • Added new WebSocket configuration options to the WebSocketParams structure, including write_buffer_size, max_write_buffer_size, max_message_size, max_frame_size, and accept_unmasked_frames. These options provide more control over WebSocket behavior, such as buffer sizes and message handling.
  • Updated the FromPyObject implementation for WebSocketParams to extract the new configuration options from Python objects. This ensures that the new parameters can be set from Python code.
  • Modified the execute_websocket_request function in src/client.rs to apply the new WebSocket configuration options using the apply_option! macro. This change integrates the new parameters into the WebSocket request builder.
  • Added the #[pyo3(get)] attribute to the new fields in WebSocketParams to expose them to Python code, allowing users to get and set these options from Python.

@0x676e67 0x676e67 merged commit 0a83669 into main Feb 21, 2025
@0x676e67 0x676e67 deleted the feat branch February 21, 2025 08:16
kreedzZhao pushed a commit to kreedzZhao/rnet that referenced this pull request Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant