I’m using giomm
wrapper for browser page updates. As browser supports multiple protocols, I’m creating new SocketClient
type configuration on every page reload (according to current page URI scheme).
The object of SocketClient
stored in class private member, because it wanted for async operations. How can I properly make this object clean (or nullptr) on page update completed?
I do following construction to close Gio::SocketConnection
on every page update action begin and async request finish, but what about Gio::SocketClient
?
// Close previous socket connection (on active)
if (socket__connection->is_connected())
{
socket__connection->close();
}
// Make new socket connection for new protocol..