implement multiprotocol socket api

This commit is contained in:
yggverse 2024-09-16 10:45:15 +03:00
parent 16cbc2ac03
commit 81c9ae2fc8
2 changed files with 97 additions and 23 deletions

View file

@ -39,7 +39,7 @@ namespace app::browser::main::tab
};
/*
* Class database
* Page class database
*
* Allowed parental access to enums and relationship methods
*/
@ -77,6 +77,41 @@ namespace app::browser::main::tab
};
};
/*
* Socket helpers
*
* Page works with multiple protocols and requires some extended features below
*/
struct Socket
{
class Client
{
private:
static Glib::RefPtr<Gio::SocketClient> create(
const int & TIMEOUT = 15
);
public:
struct Gemini
{
static Glib::RefPtr<Gio::SocketClient> create();
};
};
struct Connection
{
static bool is_active(
const Glib::RefPtr<Gio::SocketConnection> & CONNECTION
);
static bool close(
Glib::RefPtr<Gio::SocketConnection> & connection
);
};
};
/*
* Internal members
*/