1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00

LibCore: Expose some Socket properties to make then inspectable

This commit is contained in:
Conrad Pankoff 2020-12-16 18:16:15 +11:00 committed by Andreas Kling
parent ee3056ba11
commit bb4e4921c0

View file

@ -45,6 +45,25 @@ Socket::Socket(Type type, Object* parent)
: IODevice(parent)
, 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()