module fs half-stable

This commit is contained in:
2025-02-07 06:39:02 +03:00
parent 39c8a03821
commit a3e03c7da1
3 changed files with 15 additions and 8 deletions

View File

@@ -40,7 +40,8 @@ signal data_from_fs_1(data:PackedByteArray)
signal data_from_fs_2(data:PackedByteArray)
signal port_fs_opened_1(port_name: String)
signal port_fs_opened_2(port_name: String)
signal port_closed(port_name: String)
signal port_fs_closed_1(port_name: String)
signal port_fs_closed_2(port_name: String)
signal port_error(error_str: String)
@@ -78,7 +79,10 @@ func poll_receive_fs(client: StreamPeerTCP, peerstream: PacketPeer, ip_fs: Strin
return
# Проверяем состояние подключения
if client.get_status() != StreamPeerTCP.STATUS_CONNECTED:
emit_signal("port_closed", ip_fs)
if client == client_fs_1:
emit_signal("port_fs_closed_1", ip_fs)
elif client == client_fs_2:
emit_signal("port_fs_closed_2", ip_fs)
return
if peer.get_available_bytes() > 0: