mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 17:20:08 +00:00
add custom port number support
This commit is contained in:
parent
591032e349
commit
935c6ad75e
@ -523,7 +523,14 @@ impl Page {
|
|||||||
|
|
||||||
// Implement shared [SocketConnectable](https://docs.gtk.org/gio/iface.SocketConnectable.html) interface
|
// Implement shared [SocketConnectable](https://docs.gtk.org/gio/iface.SocketConnectable.html) interface
|
||||||
// * required also on `auth` step ([SNI](https://geminiprotocol.net/docs/protocol-specification.gmi#server-name-indication))
|
// * required also on `auth` step ([SNI](https://geminiprotocol.net/docs/protocol-specification.gmi#server-name-indication))
|
||||||
let connectable = NetworkAddress::new(&uri.host().unwrap(), 1965);
|
let connectable = NetworkAddress::new(
|
||||||
|
&uri.host().unwrap(),
|
||||||
|
if uri.port().is_positive() {
|
||||||
|
uri.port() as u16
|
||||||
|
} else {
|
||||||
|
1965
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
// Create connection
|
// Create connection
|
||||||
client.connect_async(
|
client.connect_async(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user