From 5bd0a93976f6818187e70a4446257d90a41c7ff1 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 17 Aug 2021 12:06:22 +0100 Subject: Add an API for checking if I/O hooks are ready or not. --- src/modules/m_websocket.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/modules/m_websocket.cpp') diff --git a/src/modules/m_websocket.cpp b/src/modules/m_websocket.cpp index 672c438e9..4d72f1bd2 100644 --- a/src/modules/m_websocket.cpp +++ b/src/modules/m_websocket.cpp @@ -459,6 +459,11 @@ class WebSocketHook : public IOHookMiddle sock->AddIOHook(this); } + bool IsHookReady() const override + { + return state == STATE_ESTABLISHED; + } + int OnStreamSocketWrite(StreamSocket* sock, StreamSocket::SendQueue& uppersendq) CXX11_OVERRIDE { StreamSocket::SendQueue& mysendq = GetSendQ(); -- cgit v1.3.1-10-gc9f91