-
-
Notifications
You must be signed in to change notification settings - Fork 315
refactor: change HTTP and WebSocket to use ixwebsocket #1312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Replaces custom ASIO-based HTTP and WebSocket implementations with ixwebsocket library for HTTP requests and WebSocket connections. Updates CMake configuration to include ixwebsocket, simplifies code, and improves maintainability and cross-platform support.
|
|
I was testing pr:
1) compilationcompiling by solution (vs community 2022) it is not possible to compile. Line 20 in 1896b13
Line 48 in 1896b13
2) solve issues 1198I confirm that this pr solves the issue #1198 mentioned by nekiro. test with this in terminal : local onRecvInfo = function(message, err) pdump(message) end HTTP.get("https://discord.com/api/v9/invites/WBMSR4qAzF?with_counts=true", onRecvInfo)
3) crash with websocketThe only easy way I have to test websock is with vbot. I'll look for a way to reproduce the crash more easily.
Possible solution ?0001-test.patch Http::ws [5] received message (119 bytes, binary=false, wireSize=119, preview='{"id":247582369,"message":["Paladin Sample","Sorcerer Sample"],"name":"Paladin Sample","topic":"list","type":"message"}')
Http::ws [5] event Message (wireSize=26)
Http::ws [5] received message (26 bytes, binary=false, wireSize=26, preview='{"type":"ping","ping":243}')
Http::wsSend [5] sending 15 bytes (readyState=OPEN buffered=0)
Http::wsSend [5] sent 15 bytes (wireSize=15 compressionError=false)
Http::ws [5] event Message (wireSize=26) |





Description
Replaces in-house ASIO networking with
ixwebsocketfor HTTP and WebSocket. Removes duplicate transport code, unifies TLS handling, and reduces platform-specific branches.CMake now finds and links
ixwebsocket(and its TLS deps via package manager).Public client APIs stay the same. Internal implementation changes only.
Dependencies:
ixwebsocket(via vcpkg or system package), OpenSSL/Schannel as provided by ixwebsocket.Behavior
Actual
Expected
Type of change
How Has This Been Tested
Built locally with vcpkg-provided
ixwebsocket.WebSocket echo test (open, send/receive, close).
Reconnect test (server drop to client auto-reconnect).
TLS handshake to a
wss://endpoint.Manual test against the staging server for gameplay messages.
CI matrix on Windows, Ubuntu, macOS.
Test A: HTTP client requests succeed and validate status/body/headers
Test B: WebSocket connects, sends, receives, reconnects, and closes cleanly
Test Configuration:
Checklist