mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-04-01 01:25:32 +00:00
return plain IOStream object
This commit is contained in:
parent
3791cbc4d0
commit
193dbef087
1 changed files with 3 additions and 2 deletions
|
|
@ -9,7 +9,7 @@ use gio::{
|
||||||
Cancellable, IOStream, NetworkAddress, SocketConnection, TlsCertificate, TlsClientConnection,
|
Cancellable, IOStream, NetworkAddress, SocketConnection, TlsCertificate, TlsClientConnection,
|
||||||
};
|
};
|
||||||
use glib::{
|
use glib::{
|
||||||
object::{Cast, IsA, ObjectExt},
|
object::{Cast, ObjectExt},
|
||||||
Bytes, Priority,
|
Bytes, Priority,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -76,8 +76,9 @@ impl Connection {
|
||||||
/// Get [IOStream](https://docs.gtk.org/gio/class.IOStream.html)
|
/// Get [IOStream](https://docs.gtk.org/gio/class.IOStream.html)
|
||||||
/// * compatible with user (certificate) and guest (certificate-less) connection type
|
/// * compatible with user (certificate) and guest (certificate-less) connection type
|
||||||
/// * useful to keep `Connection` reference active in async I/O context
|
/// * useful to keep `Connection` reference active in async I/O context
|
||||||
pub fn stream(&self) -> impl IsA<IOStream> {
|
pub fn stream(&self) -> IOStream {
|
||||||
self.tls_client_connection.clone().upcast::<IOStream>()
|
self.tls_client_connection.clone().upcast::<IOStream>()
|
||||||
|
// * also `base_io_stream` method available @TODO
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue