6#include <userver/components/component_config.hpp>
7#include <userver/components/component_context.hpp>
8#include <userver/server/handlers/http_handler_base.hpp>
9#include <userver/server/websocket/server.hpp>
11USERVER_NAMESPACE_BEGIN
13namespace server::websocket {
39 WebsocketHandlerBase(
const components::ComponentConfig&,
44 server::
request::RequestContext&)
const = 0;
49 server::
http::HttpResponse&,
50 server::
request::RequestContext&)
const {
55 void WriteMetrics(utils::statistics::Writer& writer)
const;
66 <<
"Not a GET 'Upgrade: websocket' and 'Connection: Upgrade' request";
71 std::string HandleRequestThrow(
72 const server::
http::HttpRequest& request,
73 server::
request::RequestContext& context)
const override;
75 websocket::Config config_;
76 mutable Statistics stats_;
77 utils::statistics::Entry statistics_holder_;