Skip to content

Commit e7c0919

Browse files
committed
Improve comments
1 parent ff7747d commit e7c0919

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/packet_sources/udp.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub fn remote_host_closed_conn<T>(_res: &Result<T, std::io::Error>) -> bool {
2323
false
2424
}
2525

26-
// Creates a UDP socket bound to the specified address, restricted to either IPv4 or IPv6.
26+
/// Creates a UDP socket bound to the specified address, restricted to either IPv4 or IPv6 only.
2727
pub fn create_udp_socket(host: &str, port: u16) -> Result<tokio::net::UdpSocket> {
2828
let addr = format!("{}:{}", host, port);
2929
let sock_addr = SocketAddr::from_str(&addr).context("Invalid listen address specified")?;
@@ -51,7 +51,7 @@ pub fn create_udp_socket(host: &str, port: u16) -> Result<tokio::net::UdpSocket>
5151
let std_sock: std::net::UdpSocket = sock2.into();
5252
std_sock
5353
.set_nonblocking(true)
54-
.context("Failed to make socket non-blocking")?;
54+
.context("Failed to make UDP socket non-blocking")?;
5555
let socket = UdpSocket::from_std(std_sock)?;
5656

5757
Ok(socket)

0 commit comments

Comments
 (0)