5#ifndef WPINET_HTTPWEBSOCKETSERVERCONNECTION_H_
6#define WPINET_HTTPWEBSOCKETSERVERCONNECTION_H_
8#include <initializer_list>
28template <
typename Derived>
31 public std::enable_shared_from_this<Derived> {
40 std::span<const std::string_view> protocols);
49 std::shared_ptr<uv::Stream> stream,
50 std::initializer_list<std::string_view> protocols)
52 {protocols.begin(), protocols.end()}) {}
Definition: HttpServerConnection.h:19
A server-side HTTP connection that also accepts WebSocket upgrades.
Definition: HttpWebSocketServerConnection.h:31
virtual void ProcessWsUpgrade()=0
Process an incoming WebSocket upgrade.
virtual bool IsValidWsUpgrade(std::string_view protocol)
Check that an incoming WebSocket upgrade is okay.
Definition: HttpWebSocketServerConnection.h:64
HttpWebSocketServerConnection(std::shared_ptr< uv::Stream > stream, std::span< const std::string_view > protocols)
Constructor.
Definition: HttpWebSocketServerConnection.inc:15
WebSocket * m_websocket
WebSocket connection; not valid until ProcessWsUpgrade is called.
Definition: HttpWebSocketServerConnection.h:82
HttpWebSocketServerConnection(std::shared_ptr< uv::Stream > stream, std::initializer_list< std::string_view > protocols)
Constructor.
Definition: HttpWebSocketServerConnection.h:48
RFC 6455 compliant WebSocket client and server implementation.
Definition: WebSocket.h:34
WebSocket HTTP server helper.
Definition: WebSocketServer.h:33
basic_string_view< char > string_view
Definition: core.h:520
/file This file defines the SmallVector class.
Definition: AprilTagFieldLayout.h:18