Skip to content

Commit

Permalink
Make keys required
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Jan 2, 2024
1 parent b543631 commit 7fac1c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rust/src/data_structures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ impl ListenInfo {
pub struct SocketFlags {
/// Disable dual-stack support so only IPv6 is used (only if ip is IPv6).
/// Defaults to false.
pub ipv6_only: Option<bool>,
pub ipv6_only: bool,
/// Make different transports bind to the same ip and port (only for UDP).
/// Useful for multicast scenarios with plain transport. Use with caution.
/// Defaults to false.
pub udp_reuse_port: Option<bool>,
pub udp_reuse_port: bool,
}

impl SocketFlags {
Expand Down
4 changes: 4 additions & 0 deletions rust/tests/integration/plain_transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ fn create_two_transports_binding_to_same_ip_port_with_udp_reuse_port_flag_succee
announced_ip: None,
port: Some(port),
flags: Some(SocketFlags {
ipv6_only: false,
udp_reuse_port: true,
}),
send_buffer_size: None,
Expand All @@ -458,6 +459,7 @@ fn create_two_transports_binding_to_same_ip_port_with_udp_reuse_port_flag_succee
announced_ip: None,
port: Some(port),
flags: Some(SocketFlags {
ipv6_only: false,
udp_reuse_port: true,
}),
send_buffer_size: None,
Expand Down Expand Up @@ -487,6 +489,7 @@ fn create_two_transports_binding_to_same_ip_port_without_udp_reuse_port_flag_fai
announced_ip: None,
port: Some(port),
flags: Some(SocketFlags {
ipv6_only: false,
udp_reuse_port: false,
}),
send_buffer_size: None,
Expand All @@ -505,6 +508,7 @@ fn create_two_transports_binding_to_same_ip_port_without_udp_reuse_port_flag_fai
announced_ip: None,
port: Some(port),
flags: Some(SocketFlags {
ipv6_only: false,
udp_reuse_port: false,
}),
send_buffer_size: None,
Expand Down

0 comments on commit 7fac1c8

Please sign in to comment.