feat(WebSocket): add open event (#6315)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user