@@ -262,14 +262,13 @@ impl TicTacToePlugin {
262262 } ) ;
263263
264264 let current_time = SystemTime :: now ( ) . duration_since ( SystemTime :: UNIX_EPOCH ) ?;
265- let public_addr = SocketAddr :: new ( Ipv4Addr :: LOCALHOST . into ( ) , port) ;
266- let socket = UdpSocket :: bind ( public_addr) ?;
265+ let socket = UdpSocket :: bind ( ( Ipv4Addr :: UNSPECIFIED , port) ) ?;
267266 let server_config = ServerConfig {
268267 current_time,
269268 max_clients : 1 ,
270269 protocol_id : PROTOCOL_ID ,
271270 authentication : ServerAuthentication :: Unsecure ,
272- public_addresses : vec ! [ public_addr ] ,
271+ public_addresses : Default :: default ( ) ,
273272 } ;
274273 let transport = NetcodeServerTransport :: new ( server_config, socket) ?;
275274
@@ -290,7 +289,7 @@ impl TicTacToePlugin {
290289 let current_time = SystemTime :: now ( ) . duration_since ( SystemTime :: UNIX_EPOCH ) ?;
291290 let client_id = current_time. as_millis ( ) as u64 ;
292291 let server_addr = SocketAddr :: new ( ip, port) ;
293- let socket = UdpSocket :: bind ( ( ip , 0 ) ) ?;
292+ let socket = UdpSocket :: bind ( ( Ipv4Addr :: UNSPECIFIED , 0 ) ) ?;
294293 let authentication = ClientAuthentication :: Unsecure {
295294 client_id,
296295 protocol_id : PROTOCOL_ID ,
0 commit comments