Re: Gio::SocketConnection to Gio::TlsClientConnection
- From: Markus Kolb <markus kolb+gtkmm tower-net de>
- To: gtkmm Mailinglist <gtkmm-list gnome org>
- Subject: Re: Gio::SocketConnection to Gio::TlsClientConnection
- Date: Sat, 07 Feb 2015 11:58:18 +0100
Am 2015-02-07 00:39, schrieb mohgtkmm dadygtkmm:
Hi
might the following help you:
https://developer.gnome.org/glibmm/stable/classGio_1_1TlsClientConnection.html
Good luck!
I knew this already, but I'm missing some part to get back to the
SocketConnection.
But I think I get it to work now...
Glib::RefPtr<Gio::SocketConnection> m_p_connection = ...;
Glib::RefPtr<Gio::IOStream> p_basestream =
Glib::RefPtr<Gio::IOStream>::cast_dynamic(m_p_connection);
Glib::RefPtr<Gio::TlsClientConnection> p_tlsconn =
Gio::TlsClientConnection::create(p_basestream);
For starting the TLS communication you have to call:
p_tlsconn->handshake();
Glib::RefPtr<Gio::IOStream> p_tlsstream =
Glib::RefPtr<Gio::IOStream>::cast_dynamic(p_tlsconn);
m_p_connection =
Glib::wrap(g_tcp_wrapper_connection_new(p_tlsstream->gobj(),
m_p_connection->get_socket()->gobj()));
You see what I am missing in giomm and is replaced now with a
Glib::wrap.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]