Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ixwebsocket/IXWebSocket.h
✓ #include <ixwebsocket/IXWebSocket.h>
Connect to a WebSocket echo server, send a message, and receive the echo.
#include <ixwebsocket/IXWebSocket.h>
#include <iostream>
int main() {
ix::WebSocket webSocket;
webSocket.setUrl("wss://echo.websocket.org");
webSocket.setOnMessageCallback([](const ix::WebSocketMessagePtr& msg) {
if (msg->type == ix::WebSocketMessageType::Message) {
std::cout << "Received: " << msg->str << std::endl;
}
});
webSocket.start();
webSocket.send("Hello");
std::this_thread::sleep_for(std::chrono::seconds(1));
webSocket.stop();
return 0;
}
Debug
Known issues
No known issues recorded.
Audit
Dependencies
No dependency data recorded yet.
Resources
No resource links recorded.