summaryrefslogtreecommitdiff
path: root/src/websockets/qwebsocket_p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/websockets/qwebsocket_p.cpp')
-rw-r--r--src/websockets/qwebsocket_p.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/websockets/qwebsocket_p.cpp b/src/websockets/qwebsocket_p.cpp
index 941366f..87bfa3f 100644
--- a/src/websockets/qwebsocket_p.cpp
+++ b/src/websockets/qwebsocket_p.cpp
@@ -101,6 +101,8 @@ QWebSocketPrivate::QWebSocketPrivate(const QString &origin, QWebSocketProtocol::
m_mustMask(true),
m_isClosingHandshakeSent(false),
m_isClosingHandshakeReceived(false),
+ m_closeCode(QWebSocketProtocol::CC_NORMAL),
+ m_closeReason(),
m_pingTimer(),
m_dataProcessor(),
m_configuration()
@@ -128,6 +130,8 @@ QWebSocketPrivate::QWebSocketPrivate(QTcpSocket *pTcpSocket, QWebSocketProtocol:
m_mustMask(true),
m_isClosingHandshakeSent(false),
m_isClosingHandshakeReceived(false),
+ m_closeCode(QWebSocketProtocol::CC_NORMAL),
+ m_closeReason(),
m_pingTimer(),
m_dataProcessor(),
m_configuration()
@@ -622,6 +626,22 @@ QString QWebSocketPrivate::extension() const
/*!
* \internal
*/
+QWebSocketProtocol::CloseCode QWebSocketPrivate::closeCode() const
+{
+ return m_closeCode;
+}
+
+/*!
+ * \internal
+ */
+QString QWebSocketPrivate::closeReason() const
+{
+ return m_closeReason;
+}
+
+/*!
+ * \internal
+ */
QByteArray QWebSocketPrivate::getFrameHeader(QWebSocketProtocol::OpCode opCode, quint64 payloadLength, quint32 maskingKey, bool lastFrame) const
{
QByteArray header;