mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
implement multiprotocol socket api
This commit is contained in:
parent
16cbc2ac03
commit
81c9ae2fc8
2 changed files with 97 additions and 23 deletions
|
|
@ -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
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue