From e830db667c06b0bec06fc97aa7eca326c69908bc Mon Sep 17 00:00:00 2001 From: Robert Paciorek Date: Sat, 8 Jun 2024 13:25:27 +0000 Subject: [PATCH] fix socat_terminal example * Godot 4.x seems to require call StreamPeerTCP.poll * add missing signal connection (data from terminal to network) --- examples/socat_terminal/socat_terminal.gd | 1 + examples/socat_terminal/socat_terminal.tscn | 2 ++ 2 files changed, 3 insertions(+) diff --git a/examples/socat_terminal/socat_terminal.gd b/examples/socat_terminal/socat_terminal.gd index e00d233..a78a02e 100644 --- a/examples/socat_terminal/socat_terminal.gd +++ b/examples/socat_terminal/socat_terminal.gd @@ -19,6 +19,7 @@ func _ready(): func _process(delta): + _stream.poll() match _stream.get_status(): StreamPeerTCP.STATUS_NONE, StreamPeerTCP.STATUS_CONNECTING: _timeout -= 1 diff --git a/examples/socat_terminal/socat_terminal.tscn b/examples/socat_terminal/socat_terminal.tscn index 5d3f524..892fbc5 100644 --- a/examples/socat_terminal/socat_terminal.tscn +++ b/examples/socat_terminal/socat_terminal.tscn @@ -11,3 +11,5 @@ grow_horizontal = 2 grow_vertical = 2 theme = ExtResource("1_rw2ub") script = ExtResource("1") + +[connection signal="data_sent" from="." to="." method="_on_Terminal_data_sent"]