Send an event when proxied DDS creates a connection. (#139530)
The event allows tools to listen and connect to the original DDS port.
This commit is contained in:
parent
c396011e7e
commit
7a9adfd1c7
@ -775,6 +775,11 @@ class ProxiedDartDevelopmentService implements DartDevelopmentService {
|
||||
|
||||
_localUri = remoteUri.replace(port: localPort);
|
||||
_logger.printTrace('Local port forwarded DDS on $_localUri.');
|
||||
_logger.sendEvent('device.proxied_dds_forwarded', <String, String>{
|
||||
'deviceId': deviceId,
|
||||
'remoteUri': remoteUri.toString(),
|
||||
'localUri': _localUri!.toString(),
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -440,6 +440,11 @@ void main() {
|
||||
|
||||
expect(dds.uri, Uri.parse('http://127.0.0.1:400/remote'));
|
||||
|
||||
expect(
|
||||
bufferLogger.eventText.trim(),
|
||||
'{"name":"device.proxied_dds_forwarded","args":{"deviceId":"test_id","remoteUri":"http://127.0.0.1:300/remote","localUri":"http://127.0.0.1:400/remote"}}',
|
||||
);
|
||||
|
||||
unawaited(dds.shutdown());
|
||||
|
||||
final DaemonMessage shutdownMessage = await broadcastOutput.first;
|
||||
|
Loading…
x
Reference in New Issue
Block a user