summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWebSocket/Impl
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2023-02-08 23:05:44 +0100
committerLinus Groh <mail@linusgroh.de>2023-02-13 00:50:07 +0000
commita96339b72b3b417ffaa4fbb4e7575149f749acaa (patch)
tree10cd665265e85a750d6a84713bedf73acf359069 /Userland/Libraries/LibWebSocket/Impl
parentd43a7eae545cd699f301471bd0f82399174339c1 (diff)
downloadserenity-a96339b72b3b417ffaa4fbb4e7575149f749acaa.zip
LibCore: Move Stream-based sockets into the `Core` namespace
Diffstat (limited to 'Userland/Libraries/LibWebSocket/Impl')
-rw-r--r--Userland/Libraries/LibWebSocket/Impl/WebSocketImplSerenity.cpp9
-rw-r--r--Userland/Libraries/LibWebSocket/Impl/WebSocketImplSerenity.h2
2 files changed, 6 insertions, 5 deletions
diff --git a/Userland/Libraries/LibWebSocket/Impl/WebSocketImplSerenity.cpp b/Userland/Libraries/LibWebSocket/Impl/WebSocketImplSerenity.cpp
index 99dc9e89f2..401e03d921 100644
--- a/Userland/Libraries/LibWebSocket/Impl/WebSocketImplSerenity.cpp
+++ b/Userland/Libraries/LibWebSocket/Impl/WebSocketImplSerenity.cpp
@@ -7,6 +7,7 @@
*/
#include <LibCore/EventLoop.h>
+#include <LibCore/Socket.h>
#include <LibWebSocket/Impl/WebSocketImplSerenity.h>
namespace WebSocket {
@@ -40,18 +41,18 @@ void WebSocketImplSerenity::connect(ConnectionInfo const& connection_info)
VERIFY(on_connected);
VERIFY(on_connection_error);
VERIFY(on_ready_to_read);
- auto socket_result = [&]() -> ErrorOr<NonnullOwnPtr<Core::Stream::BufferedSocketBase>> {
+ auto socket_result = [&]() -> ErrorOr<NonnullOwnPtr<Core::BufferedSocketBase>> {
if (connection_info.is_secure()) {
TLS::Options options;
options.set_alert_handler([this](auto) {
on_connection_error();
});
- return TRY(Core::Stream::BufferedSocket<TLS::TLSv12>::create(
+ return TRY(Core::BufferedSocket<TLS::TLSv12>::create(
TRY(TLS::TLSv12::connect(connection_info.url().host(), connection_info.url().port_or_default(), move(options)))));
}
- return TRY(Core::Stream::BufferedTCPSocket::create(
- TRY(Core::Stream::TCPSocket::connect(connection_info.url().host(), connection_info.url().port_or_default()))));
+ return TRY(Core::BufferedTCPSocket::create(
+ TRY(Core::TCPSocket::connect(connection_info.url().host(), connection_info.url().port_or_default()))));
}();
if (socket_result.is_error()) {
diff --git a/Userland/Libraries/LibWebSocket/Impl/WebSocketImplSerenity.h b/Userland/Libraries/LibWebSocket/Impl/WebSocketImplSerenity.h
index 55ca5e5c26..a475898dbd 100644
--- a/Userland/Libraries/LibWebSocket/Impl/WebSocketImplSerenity.h
+++ b/Userland/Libraries/LibWebSocket/Impl/WebSocketImplSerenity.h
@@ -26,7 +26,7 @@ public:
virtual void discard_connection() override;
private:
- OwnPtr<Core::Stream::BufferedSocketBase> m_socket;
+ OwnPtr<Core::BufferedSocketBase> m_socket;
};
}