2 QWebSockets implements the WebSocket protocol as defined in RFC 6455.
3 Copyright (C) 2013 Kurt Pattyn (pattyn.kurt@gmail.com)
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef HANDSHAKEREQUEST_P_H
21 #define HANDSHAKEREQUEST_P_H
26 // This file is not part of the Qt API. It exists purely as an
27 // implementation detail. This header file may change from version to
28 // version without notice, or even be removed.
39 #include "qwebsocketprotocol.h"
45 class HandshakeRequest
48 HandshakeRequest(int port, bool isSecure);
49 virtual ~HandshakeRequest();
54 bool isSecure() const;
56 QMap<QString, QString> getHeaders() const;
57 QList<QWebSocketProtocol::Version> getVersions() const;
58 QString getKey() const;
59 QString getOrigin() const;
60 QList<QString> getProtocols() const;
61 QList<QString> getExtensions() const;
62 QUrl getRequestUrl() const;
63 QString getResourceName() const;
64 QString getHost() const;
67 Q_DISABLE_COPY(HandshakeRequest)
68 QTextStream &readFromStream(QTextStream &textStream);
69 friend QTextStream &operator >>(QTextStream &stream, HandshakeRequest &request);
74 QMap<QString, QString> m_headers;
75 QList<QWebSocketProtocol::Version> m_versions;
78 QList<QString> m_protocols;
79 QList<QString> m_extensions;
83 QTextStream &operator >>(QTextStream &stream, HandshakeRequest &request);
87 #endif // HANDSHAKEREQUEST_P_H