mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-20 08:18:55 +00:00
LibCore: Expose some Socket properties to make then inspectable
This commit is contained in:
parent
ee3056ba11
commit
bb4e4921c0
Notes:
sideshowbarker
2024-07-19 00:47:57 +09:00
Author: https://github.com/deoxxa
Commit: bb4e4921c0
Pull-request: https://github.com/SerenityOS/serenity/pull/4430
1 changed files with 19 additions and 0 deletions
|
@ -45,6 +45,25 @@ Socket::Socket(Type type, Object* parent)
|
||||||
: IODevice(parent)
|
: IODevice(parent)
|
||||||
, m_type(type)
|
, m_type(type)
|
||||||
{
|
{
|
||||||
|
register_property(
|
||||||
|
"source_address", [this] { return m_source_address.to_string(); },
|
||||||
|
[](auto&) { return false; });
|
||||||
|
|
||||||
|
register_property(
|
||||||
|
"destination_address", [this] { return m_destination_address.to_string(); },
|
||||||
|
[](auto&) { return false; });
|
||||||
|
|
||||||
|
register_property(
|
||||||
|
"source_port", [this] { return m_source_port; },
|
||||||
|
[](auto&) { return false; });
|
||||||
|
|
||||||
|
register_property(
|
||||||
|
"destination_port", [this] { return m_destination_port; },
|
||||||
|
[](auto&) { return false; });
|
||||||
|
|
||||||
|
register_property(
|
||||||
|
"connected", [this] { return m_connected; },
|
||||||
|
[](auto&) { return false; });
|
||||||
}
|
}
|
||||||
|
|
||||||
Socket::~Socket()
|
Socket::~Socket()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue