Skip to content

feat(ws): add resilient websocket options#10

Merged
SebastianBoehler merged 1 commit into
mainfrom
codex/websocket-resilience
May 11, 2026
Merged

feat(ws): add resilient websocket options#10
SebastianBoehler merged 1 commit into
mainfrom
codex/websocket-resilience

Conversation

@SebastianBoehler
Copy link
Copy Markdown
Owner

Summary

  • add WebSocketOptions, WebSocketStats, typed stream message callbacks, and subscription tracking to WebSocketClient
  • add bounded message dispatch with deterministic drop-oldest backpressure and metrics
  • configure reconnect backoff/ping behavior through IXWebSocket and restore tracked subscriptions after reconnect
  • update OrderbookManager to track and restore its subscription message without changing its existing raw callback behavior
  • add deterministic tests for queue overflow, typed message parsing, ignored heartbeat messages, and malformed JSON parse handling
  • document the new WebSocket resilience API in the README

Validation

  • cmake -S . -B /tmp/polymarket-cpp-client-verify -DPOLYMARKET_CLIENT_BUILD_EXAMPLES=ON -DPOLYMARKET_CLIENT_BUILD_TESTS=ON
  • cmake --build /tmp/polymarket-cpp-client-verify -- -j4
  • ctest --test-dir /tmp/polymarket-cpp-client-verify --output-on-failure
  • git diff --check

@SebastianBoehler SebastianBoehler force-pushed the codex/websocket-resilience branch from b6ccb9e to 0eb08e3 Compare May 11, 2026 14:29
@SebastianBoehler SebastianBoehler merged commit 56ef462 into main May 11, 2026
1 check passed
@SebastianBoehler SebastianBoehler deleted the codex/websocket-resilience branch May 11, 2026 14:29
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