bolar_2 backup
This commit is contained in:
21
main/protocol/websocket_uri.h
Normal file
21
main/protocol/websocket_uri.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
|
||||
namespace borla {
|
||||
|
||||
inline constexpr size_t kWebsocketHostCapacity = 128;
|
||||
inline constexpr size_t kWebsocketPathCapacity = 384;
|
||||
|
||||
struct WebsocketUri {
|
||||
bool secure = false;
|
||||
uint16_t port = 0;
|
||||
std::array<char, kWebsocketHostCapacity> host{};
|
||||
std::array<char, kWebsocketPathCapacity> path{};
|
||||
};
|
||||
|
||||
bool ParseWebsocketUri(const char* uri, WebsocketUri* output);
|
||||
|
||||
} // namespace borla
|
||||
Reference in New Issue
Block a user