I don’t understand what exactly this method does:
If create TLS session, how can I get / cast TlsConnection from SocketClient
where it option set as true
I don’t understand what exactly this method does:
If create TLS session, how can I get / cast TlsConnection from SocketClient
where it option set as true
Sorry, I forgot to update GIO version to 2.28, now everything work as documented:
Note that since
GSocketClient
must return aGSocketConnection
, butGTlsClientConnection
is not aGSocketConnection
, this actually wraps the resultingGTlsClientConnection
in aGTcpWrapperConnection
when returning it. You can useg_tcp_wrapper_connection_get_base_io_stream()
on the return value to extract theGTlsClientConnection
.
But GLib 2.28 was released in 2011. You were using something even older than that?
This forum is for discussing recent software versions. Please make sure you’ve updated to 2.82 or something at least close to that.
2.28
is min requirement by documentation, I have 2.70
Anyway, to answer my question, seems there is no way to cast, but create new TlsClientConnection
for existing IOStream
to interact it as TlsClientConnection
.