TCP port listen: Fix the hint server as well

This commit is contained in:
Morten Minde Neergaard 2022-11-13 14:38:15 +01:00
parent 513e44d128
commit 02f21db6d0
2 changed files with 3 additions and 2 deletions

View file

@ -20,7 +20,8 @@ var _hint_client_connection
func _ready(): func _ready():
_hint_server = TCP_Server.new() _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() var args = helpers.parse_args()

View file

@ -3,7 +3,7 @@
use IO::Socket; use IO::Socket;
$socket = IO::Socket::INET->new(PeerAddr => "127.0.0.1", $socket = IO::Socket::INET->new(PeerAddr => "127.0.0.1",
PeerPort => 1235, PeerPort => $ENV{HINT_TCP_PORT},
Proto => "tcp", Proto => "tcp",
Type => SOCK_STREAM); Type => SOCK_STREAM);