server.tscn 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. [gd_scene load_steps=4 format=3 uid="uid://qvg4q16blgx5"]
  2. [ext_resource type="PackedScene" uid="uid://cyvrywci15kev" path="res://chat.tscn" id="1_i673i"]
  3. [ext_resource type="Script" path="res://server.gd" id="1_urpfw"]
  4. [ext_resource type="Script" path="res://websocket/WebSocketServer.gd" id="3_0eqsy"]
  5. [node name="Server" instance=ExtResource("1_i673i")]
  6. script = ExtResource("1_urpfw")
  7. [node name="WebSocketServer" type="Node" parent="." index="0"]
  8. script = ExtResource("3_0eqsy")
  9. supported_protocols = PackedStringArray("demo-chat")
  10. [node name="Panel" parent="." index="1"]
  11. layout_mode = 1
  12. anchors_preset = 15
  13. [node name="VBoxContainer" parent="Panel" index="0"]
  14. layout_mode = 1
  15. anchors_preset = 15
  16. [node name="Host" parent="Panel/VBoxContainer/Connect" index="0"]
  17. visible = false
  18. [node name="Connect" parent="Panel/VBoxContainer/Connect" index="1"]
  19. visible = false
  20. [connection signal="client_connected" from="WebSocketServer" to="." method="_on_web_socket_server_client_connected"]
  21. [connection signal="client_disconnected" from="WebSocketServer" to="." method="_on_web_socket_server_client_disconnected"]
  22. [connection signal="message_received" from="WebSocketServer" to="." method="_on_web_socket_server_message_received"]
  23. [connection signal="toggled" from="Panel/VBoxContainer/Connect/Listen" to="." method="_on_listen_toggled"]
  24. [connection signal="pressed" from="Panel/VBoxContainer/Send/Send" to="." method="_on_send_pressed"]