feat(WebSocket): add open event (#6315)

This commit is contained in:
nerix
2025-07-05 14:36:22 +02:00
committed by GitHub
parent 7a0de27253
commit 91c2c1021c
9 changed files with 79 additions and 6 deletions
+5
View File
@@ -42,6 +42,11 @@ private:
struct WebSocketListener {
virtual ~WebSocketListener() = default;
/// The WebSocket handshake completed successfully.
///
/// This function is called from the websocket thread.
virtual void onOpen() = 0;
/// A text message was received.
///
/// This function is called from the websocket thread.
@@ -194,6 +194,7 @@ void WebSocketConnectionHelper<Derived, Inner>::onWsHandshake(
qCDebug(chatterinoWebsocket) << *this << "WS handshake done";
this->listener->onOpen();
this->trySend();
this->stream.async_read(
this->readBuffer,