File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ def __init__(
6666 print ("No game binary has been provided, please press PLAY in the Godot editor" )
6767
6868 self .port = port
69+ self .host_binding = kwargs .get ("host_binding" , False )
6970 self .connection = self ._start_server ()
7071 self .num_envs = None
7172 self ._handshake ()
@@ -336,7 +337,8 @@ def _start_server(self):
336337 sock .setsockopt (socket .SOL_SOCKET , socket .SO_REUSEADDR , 1 )
337338
338339 # Bind the socket to the port, "localhost" was not working on windows VM, had to use the IP
339- server_address = ("0.0.0.0" , self .port )
340+ address = "0.0.0.0" if self .host_binding else "127.0.0.1"
341+ server_address = (address , self .port )
340342 sock .bind (server_address )
341343
342344 # Listen for incoming connections
You can’t perform that action at this time.
0 commit comments