22 lines
464 B
C++
22 lines
464 B
C++
#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
|