Lines Matching refs:req
75 bool WebSocket::HttpProtocolDecode(const std::string& request, HttpProtocol& req) in HttpProtocolDecode() argument
85 req.version = headers.at(2); // 2: to get the version param in HttpProtocolDecode()
89 req.connection = headers.at(1); // 1: to get the connection param in HttpProtocolDecode()
91 req.upgrade = headers.at(1); // 1: to get the upgrade param in HttpProtocolDecode()
93 req.secWebSocketKey = headers.at(1); // 1: to get the secWebSocketKey param in HttpProtocolDecode()
188 bool WebSocket::ProtocolUpgrade(const HttpProtocol& req) in ProtocolUpgrade() argument
190 std::string rawKey = req.secWebSocketKey + WEB_SOCKET_GUID; in ProtocolUpgrade()
267 HttpProtocol req; in HttpHandShake() local
268 if (!HttpProtocolDecode(msgBuf, req)) { in HttpHandShake()
271 } else if (req.connection.find("Upgrade") != std::string::npos && in HttpHandShake()
272 … req.upgrade.find("websocket") != std::string::npos && req.version.compare("HTTP/1.1") == 0) { in HttpHandShake()
273 ProtocolUpgrade(req); in HttpHandShake()