diff --git a/scenes/main.gd b/scenes/main.gd index 0ad09c2..0e40134 100644 --- a/scenes/main.gd +++ b/scenes/main.gd @@ -20,7 +20,8 @@ var _hint_client_connection func _ready(): _hint_server = TCP_Server.new() - _hint_server.listen(1235) + _hint_server.listen(1235, "127.0.0.1") + OS.set_environment("HINT_TCP_PORT", "1235") var args = helpers.parse_args() diff --git a/scripts/hint b/scripts/hint index 8b24e7a..7ea185d 100755 --- a/scripts/hint +++ b/scripts/hint @@ -3,7 +3,7 @@ use IO::Socket; $socket = IO::Socket::INET->new(PeerAddr => "127.0.0.1", - PeerPort => 1235, + PeerPort => $ENV{HINT_TCP_PORT}, Proto => "tcp", Type => SOCK_STREAM);