1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:17:45 +00:00

LibCore: Move Stream-based sockets into the Core namespace

This commit is contained in:
Tim Schumacher 2023-02-08 23:05:44 +01:00 committed by Linus Groh
parent d43a7eae54
commit a96339b72b
123 changed files with 1157 additions and 1100 deletions

View file

@ -10,7 +10,7 @@
namespace IMAP {
Client::Client(StringView host, u16 port, NonnullOwnPtr<Core::Stream::Socket> socket)
Client::Client(StringView host, u16 port, NonnullOwnPtr<Core::Socket> socket)
: m_host(host)
, m_port(port)
, m_socket(move(socket))
@ -49,7 +49,7 @@ ErrorOr<NonnullOwnPtr<Client>> Client::connect_tls(StringView host, u16 port)
ErrorOr<NonnullOwnPtr<Client>> Client::connect_plaintext(StringView host, u16 port)
{
auto socket = TRY(Core::Stream::TCPSocket::connect(host, port));
auto socket = TRY(Core::TCPSocket::connect(host, port));
dbgln("Connected to {}:{}", host, port);
return adopt_nonnull_own_or_enomem(new (nothrow) Client(host, port, move(socket)));
}