Skip to content

Commit

Permalink
Add rust binding for s2n_set_config_send_buffer_size (#3582)
Browse files Browse the repository at this point in the history
* Add rust binding for s2n_set_config_send_buffer_size

Useful for netbench testing of the send buffer size.

* Fix format
  • Loading branch information
harrisonkaiser authored Nov 2, 2022
1 parent 16e1a0e commit 458ad65
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bindings/rust/s2n-tls/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,11 @@ impl Builder {
Ok(self)
}

pub fn set_send_buffer_size(&mut self, size: u32) -> Result<&mut Self, Error> {
unsafe { s2n_config_set_send_buffer_size(self.as_mut_ptr(), size).into_result() }?;
Ok(self)
}

/// Set a custom callback function which is run after parsing the client hello.
pub fn set_client_hello_callback<T: 'static + ClientHelloCallback>(
&mut self,
Expand Down

0 comments on commit 458ad65

Please sign in to comment.