mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 23:07:35 +00:00
LookupServer: Propagate the errors from MulticastDNS::lookup()
This patch slightly change the signature of lookup() method and propagates all the errors to the caller with help of ErrorOr.
This commit is contained in:
parent
767529ebf5
commit
e279a1723b
3 changed files with 13 additions and 18 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Sergey Bugaev <bugaevc@serenityos.org>
|
||||
* Copyright (c) 2022, Alexander Narsudinov <a.narsudinov@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -20,7 +21,7 @@ using namespace DNS;
|
|||
class MulticastDNS : public Core::UDPServer {
|
||||
C_OBJECT(MulticastDNS)
|
||||
public:
|
||||
Vector<Answer> lookup(Name const&, RecordType record_type);
|
||||
ErrorOr<Vector<Answer>> lookup(Name const&, RecordType record_type);
|
||||
|
||||
private:
|
||||
explicit MulticastDNS(Object* parent = nullptr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue