how to understand the following code:
let socket = UdpSocket::bind((any, 0)).expect("Could not bind socket");
what do the port 0 and ipaddr any represent in the above sentence?
how to understand the following code:
let socket = UdpSocket::bind((any, 0)).expect("Could not bind socket");
what do the port 0 and ipaddr any represent in the above sentence?
It means "pick any unused port".
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.