mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 15:10:19 +00:00
001df24935
Some checks are pending
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
This change aims to improve the speed of incremental builds.
47 lines
1.3 KiB
C++
47 lines
1.3 KiB
C++
/*
|
|
* Copyright (c) 2021, Dex♪ <dexes.ttp@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Vector.h>
|
|
#include <LibHTTP/HeaderMap.h>
|
|
#include <LibURL/URL.h>
|
|
|
|
namespace WebSocket {
|
|
|
|
class ConnectionInfo final {
|
|
public:
|
|
ConnectionInfo(URL::URL);
|
|
|
|
URL::URL const& url() const { return m_url; }
|
|
|
|
ByteString const& origin() const { return m_origin; }
|
|
void set_origin(ByteString origin) { m_origin = move(origin); }
|
|
|
|
Vector<ByteString> const& protocols() const { return m_protocols; }
|
|
void set_protocols(Vector<ByteString> protocols) { m_protocols = move(protocols); }
|
|
|
|
Vector<ByteString> const& extensions() const { return m_extensions; }
|
|
void set_extensions(Vector<ByteString> extensions) { m_extensions = move(extensions); }
|
|
|
|
HTTP::HeaderMap const& headers() const { return m_headers; }
|
|
void set_headers(HTTP::HeaderMap headers) { m_headers = move(headers); }
|
|
|
|
// secure flag - defined in RFC 6455 Section 3
|
|
bool is_secure() const;
|
|
|
|
// "resource-name" or "/resource name/" - defined in RFC 6455 Section 3
|
|
ByteString resource_name() const;
|
|
|
|
private:
|
|
URL::URL m_url;
|
|
ByteString m_origin;
|
|
Vector<ByteString> m_protocols {};
|
|
Vector<ByteString> m_extensions {};
|
|
HTTP::HeaderMap m_headers;
|
|
};
|
|
|
|
}
|