mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
add custom port number support
This commit is contained in:
parent
591032e349
commit
935c6ad75e
1 changed files with 8 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue