aboutsummaryrefslogtreecommitdiff
path: root/examples/http3-client.rs
diff options
context:
space:
mode:
authorGravatar Alessandro Ghedini <alessandro@ghedini.me> 2020-12-16 13:39:16 +0000
committerGravatar Alessandro Ghedini <alessandro@ghedini.me> 2021-01-21 14:11:19 +0000
commitc4786c06a71cd6b41d9f49d6a055800e19f96a57 (patch)
tree65ce40def20b20bdd274286dbcde9f31d392e640 /examples/http3-client.rs
parent9d0c677ef1411b24d720b5c8b73bcc94b5535c29 (diff)
downloadquiche-c4786c06a71cd6b41d9f49d6a055800e19f96a57.tar.gz
quiche-c4786c06a71cd6b41d9f49d6a055800e19f96a57.tar.zst
quiche-c4786c06a71cd6b41d9f49d6a055800e19f96a57.zip
use ConnectionId in public functions
This changes the remaining public APIs to use the ConnectionId type for connection ID values, instead of slices. The FFI API is left as-is, as there isn't much point to introduce a new type there.
Diffstat (limited to 'examples/http3-client.rs')
-rw-r--r--examples/http3-client.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/http3-client.rs b/examples/http3-client.rs
index abd504cc..bb770100 100644
--- a/examples/http3-client.rs
+++ b/examples/http3-client.rs
@@ -102,10 +102,10 @@ fn main() {
let mut http3_conn = None;
// Generate a random source connection ID for the connection.
- let mut scid = vec![0; quiche::MAX_CONN_ID_LEN];
+ let mut scid = [0; quiche::MAX_CONN_ID_LEN];
SystemRandom::new().fill(&mut scid[..]).unwrap();
- let scid = quiche::ConnectionId::from_vec(scid);
+ let scid = quiche::ConnectionId::from_ref(&scid);
// Create a QUIC connection and initiate handshake.
let mut conn = quiche::connect(url.domain(), &scid, &mut config).unwrap();