diff options
author | 2019-02-08 17:04:46 +0000 | |
---|---|---|
committer | 2019-02-08 17:04:46 +0000 | |
commit | 6cf36bbfc8e5b833dee49958a33c899c73bf8e21 (patch) | |
tree | a91704398adadd6acfcbd259b8a1f5742a583572 /src/lib.rs | |
parent | 032418f1ce8fa4c5c11fcf1e53207003f7ba86c6 (diff) | |
download | quiche-6cf36bbfc8e5b833dee49958a33c899c73bf8e21.tar.gz quiche-6cf36bbfc8e5b833dee49958a33c899c73bf8e21.tar.zst quiche-6cf36bbfc8e5b833dee49958a33c899c73bf8e21.zip |
expand stateless retry documentation
Diffstat (limited to '')
-rw-r--r-- | src/lib.rs | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -552,12 +552,20 @@ pub fn negotiate_version( packet::negotiate_version(scid, dcid, out) } -/// Writes a retry packet. +/// Writes a stateless retry packet. /// /// The `scid` and `dcid` parameters are the source connection ID and the /// destination connection ID extracted from the received client's Initial /// packet, while `new_scid` is the server's new source connection ID and -/// `token` is the address verification token the client needs to echo back. +/// `token` is the address validation token the client needs to echo back. +/// +/// The application is responsible for generating the address validation +/// token to be sent to the client, and verifying tokens sent back by the +/// client. The generated token should include the `dcid` parameter, such +/// that it can be later extracted from the token and passed to the +/// [`accept()`] function as its `odcid` parameter. +/// +/// [`accept()`]: fn.accept.html pub fn retry( scid: &[u8], dcid: &[u8], new_scid: &[u8], token: &[u8], out: &mut [u8], ) -> Result<usize> { |