mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-14 21:42:19 +00:00
LibTLS: Pass socket address as const reference
This commit is contained in:
parent
752f5b18fd
commit
f74131d50a
Notes:
github-actions[bot]
2025-02-22 17:41:09 +00:00
Author: https://github.com/devgianlu
Commit: f74131d50a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3669
Reviewed-by: https://github.com/alimpfard ✅
2 changed files with 4 additions and 4 deletions
|
@ -18,13 +18,13 @@ namespace TLS {
|
||||||
ErrorOr<NonnullOwnPtr<TLSv12>> TLSv12::connect(ByteString const& host, u16 port, Options options)
|
ErrorOr<NonnullOwnPtr<TLSv12>> TLSv12::connect(ByteString const& host, u16 port, Options options)
|
||||||
{
|
{
|
||||||
auto tcp_socket = TRY(Core::TCPSocket::connect(host, port));
|
auto tcp_socket = TRY(Core::TCPSocket::connect(host, port));
|
||||||
return connect_internal(move(tcp_socket), host, options);
|
return connect_internal(move(tcp_socket), host, move(options));
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorOr<NonnullOwnPtr<TLSv12>> TLSv12::connect(Core::SocketAddress address, ByteString const& host, Options options)
|
ErrorOr<NonnullOwnPtr<TLSv12>> TLSv12::connect(Core::SocketAddress const& address, ByteString const& host, Options options)
|
||||||
{
|
{
|
||||||
auto tcp_socket = TRY(Core::TCPSocket::connect(address));
|
auto tcp_socket = TRY(Core::TCPSocket::connect(address));
|
||||||
return connect_internal(move(tcp_socket), host, options);
|
return connect_internal(move(tcp_socket), host, move(options));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wait_for_activity(int sock, bool read)
|
static void wait_for_activity(int sock, bool read)
|
||||||
|
|
|
@ -59,7 +59,7 @@ public:
|
||||||
virtual ErrorOr<void> set_blocking(bool block) override;
|
virtual ErrorOr<void> set_blocking(bool block) override;
|
||||||
virtual ErrorOr<void> set_close_on_exec(bool enabled) override;
|
virtual ErrorOr<void> set_close_on_exec(bool enabled) override;
|
||||||
|
|
||||||
static ErrorOr<NonnullOwnPtr<TLSv12>> connect(Core::SocketAddress, ByteString const& host, Options = {});
|
static ErrorOr<NonnullOwnPtr<TLSv12>> connect(Core::SocketAddress const&, ByteString const& host, Options = {});
|
||||||
static ErrorOr<NonnullOwnPtr<TLSv12>> connect(ByteString const& host, u16 port, Options = {});
|
static ErrorOr<NonnullOwnPtr<TLSv12>> connect(ByteString const& host, u16 port, Options = {});
|
||||||
|
|
||||||
~TLSv12() override;
|
~TLSv12() override;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue