mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 14:17:34 +00:00
LibCore: Move Stream-based sockets into the Core
namespace
This commit is contained in:
parent
d43a7eae54
commit
a96339b72b
123 changed files with 1157 additions and 1100 deletions
|
@ -15,7 +15,7 @@ using namespace DNS;
|
|||
|
||||
static HashMap<int, RefPtr<ConnectionFromClient>> s_connections;
|
||||
|
||||
ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSocket> socket, int client_id)
|
||||
ConnectionFromClient::ConnectionFromClient(NonnullOwnPtr<Core::LocalSocket> socket, int client_id)
|
||||
: IPC::ConnectionFromClient<LookupClientEndpoint, LookupServerEndpoint>(*this, move(socket), client_id)
|
||||
{
|
||||
s_connections.set(client_id, *this);
|
||||
|
|
|
@ -23,7 +23,7 @@ public:
|
|||
virtual void die() override;
|
||||
|
||||
private:
|
||||
explicit ConnectionFromClient(NonnullOwnPtr<Core::Stream::LocalSocket>, int client_id);
|
||||
explicit ConnectionFromClient(NonnullOwnPtr<Core::LocalSocket>, int client_id);
|
||||
|
||||
virtual Messages::LookupServer::LookupNameResponse lookup_name(DeprecatedString const&) override;
|
||||
virtual Messages::LookupServer::LookupAddressResponse lookup_address(DeprecatedString const&) override;
|
||||
|
|
|
@ -237,7 +237,7 @@ ErrorOr<Vector<Answer>> LookupServer::lookup(Name const& name, DeprecatedString
|
|||
|
||||
auto buffer = TRY(request.to_byte_buffer());
|
||||
|
||||
auto udp_socket = TRY(Core::Stream::UDPSocket::connect(nameserver, 53, Time::from_seconds(1)));
|
||||
auto udp_socket = TRY(Core::UDPSocket::connect(nameserver, 53, Time::from_seconds(1)));
|
||||
TRY(udp_socket->set_blocking(true));
|
||||
|
||||
TRY(udp_socket->write(buffer));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue