|
|
@ -323,16 +323,13 @@ void Page::navigation_reload( |
|
|
|
if (Socket::Connection::is_active(socket__connection)) // @TODO
|
|
|
|
if (Socket::Connection::is_active(socket__connection)) // @TODO
|
|
|
|
{ |
|
|
|
{ |
|
|
|
// Build gemini protocol request
|
|
|
|
// Build gemini protocol request
|
|
|
|
const Glib::ustring SOCKET__REQUEST = Glib::ustring::sprintf( |
|
|
|
const auto REQUEST = Socket::Client::Gemini::get_request_from_uri( |
|
|
|
"%s\r\n", |
|
|
|
|
|
|
|
g_uri_to_string( |
|
|
|
|
|
|
|
uri |
|
|
|
uri |
|
|
|
) |
|
|
|
|
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
socket__connection->get_output_stream()->write_async( |
|
|
|
socket__connection->get_output_stream()->write_async( |
|
|
|
SOCKET__REQUEST.data(), |
|
|
|
REQUEST.data(), |
|
|
|
SOCKET__REQUEST.size(), |
|
|
|
REQUEST.size(), |
|
|
|
[this](const Glib::RefPtr<Gio::AsyncResult>&) |
|
|
|
[this](const Glib::RefPtr<Gio::AsyncResult>&) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Update
|
|
|
|
// Update
|
|
|
@ -672,6 +669,20 @@ Glib::RefPtr<Gio::SocketClient> Page::Socket::Client::Gemini::create() |
|
|
|
return GEMINI_CLIENT; |
|
|
|
return GEMINI_CLIENT; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
* Build request string for Gemini protocol from GUri pointer |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
Glib::ustring Page::Socket::Client::Gemini::get_request_from_uri( |
|
|
|
|
|
|
|
GUri * uri |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
return Glib::ustring::sprintf( |
|
|
|
|
|
|
|
"%s\r\n", |
|
|
|
|
|
|
|
g_uri_to_string( |
|
|
|
|
|
|
|
uri |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Check socket connection active according to page class implementation |
|
|
|
* Check socket connection active according to page class implementation |
|
|
|
*/ |
|
|
|
*/ |
|
|
|