Add support for multiple RemoteDebuggerPeer(s).

It is now possible to register protocol handlers (default tcp://) to
support additional debugging communication layers (e.g. websocket).
This commit is contained in:
Fabio Alessandrelli
2020-03-11 11:23:21 +01:00
parent beb87504e0
commit ed225faf31
6 changed files with 49 additions and 30 deletions

View File

@@ -42,7 +42,6 @@ protected:
int max_queued_messages = 4096;
public:
static Ref<RemoteDebuggerPeer> create_from_uri(const String p_uri);
virtual bool is_peer_connected() = 0;
virtual bool has_message() = 0;
virtual Error put_message(const Array &p_arr) = 0;
@@ -50,6 +49,7 @@ public:
virtual void close() = 0;
virtual void poll() = 0;
virtual int get_max_message_size() const = 0;
virtual bool can_block() const { return true; } // If blocking io is allowed on main thread (debug).
RemoteDebuggerPeer();
};
@@ -77,6 +77,8 @@ private:
void _read_in();
public:
static RemoteDebuggerPeer *create(const String &p_uri);
Error connect_to_host(const String &p_host, uint16_t p_port);
void poll();