df8bf384eb
A new RPC is introduced `_registerService` which allow clients to register new services that are accessible from all the other clients. Each registered endpoint is identified by 3 strings: - `service` a non empty string which identifies the provided service (e.g. `HotReload`, `OpenFile`) - `alias` an alias for that particular endpoint used by clients to identify it (e.g. `Flutter`, `IntelliJ`) - `method` __generated__ the RPC method that should be invoked from a client to request it A new _stream_ `_Service` is introduce, and two related events: - `ServiceRegistered` which is triggered when a new client is registered. All the related information (`service`, `alias`, `method`) are sent. - `ServiceUnregistered` which is triggered when a client, which previously registered a service, disconnects. Just `service` and `method` are sent. Related https://github.com/dart-lang/sdk/issues/30023 R=asiva@google.com, bkonyi@google.com Review-Url: https://codereview.chromium.org/2980733003 .