#include <userver/clients/http/websocket_response.hpp>
HTTP response for WebSocket upgrade.
Call http::client::Request::PerformWebSocketHandshake() to get one. After successful WebSocket handshake, you can use MakeWebSocketConnection() to establish a WebSocket connection.
Definition at line 24 of file websocket_response.hpp.
Public Member Functions | |
| WebSocketResponse (WebSocketResponse &&)=default | |
| WebSocketResponse (const WebSocketResponse &)=delete | |
| WebSocketResponse & | operator= (WebSocketResponse &&)=default |
| WebSocketResponse & | operator= (const WebSocketResponse &)=delete |
| std::shared_ptr< Response > | GetHandshakeResponse () |
| Get the HTTP handshake response. | |
| bool | IsProtocolUpgraded () const |
| Check if WebSocket protocol upgrade was successful. | |
| std::shared_ptr< websocket::WebSocketConnection > | MakeWebSocketConnection () |
| Create a WebSocket connection from this response. | |
|
inline |
Get the HTTP handshake response.
Definition at line 37 of file websocket_response.hpp.
| bool clients::http::WebSocketResponse::IsProtocolUpgraded | ( | ) | const |
Check if WebSocket protocol upgrade was successful.