#pragma once #include "scene/main/node.h" class ServerNode : public Node { GDCLASS(ServerNode, Node); static ServerNode *singleton_instance; static void _bind_methods(); void enter_tree(); void process(double delta); void exit_tree(); protected: void _notification(int what); public: static ServerNode *get_singleton(); bool open(); void close(); bool is_open() const; public: static String const sig_clue_revealed; static String const sig_connection_established; static String const sig_connection_lost; private: bool is_connected{ false }; };