File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ pub fn remote_host_closed_conn<T>(_res: &Result<T, std::io::Error>) -> bool {
23
23
false
24
24
}
25
25
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 .
27
27
pub fn create_udp_socket ( host : & str , port : u16 ) -> Result < tokio:: net:: UdpSocket > {
28
28
let addr = format ! ( "{}:{}" , host, port) ;
29
29
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>
51
51
let std_sock: std:: net:: UdpSocket = sock2. into ( ) ;
52
52
std_sock
53
53
. set_nonblocking ( true )
54
- . context ( "Failed to make socket non-blocking" ) ?;
54
+ . context ( "Failed to make UDP socket non-blocking" ) ?;
55
55
let socket = UdpSocket :: from_std ( std_sock) ?;
56
56
57
57
Ok ( socket)
You can’t perform that action at this time.
0 commit comments