Compare commits

..

1 Commits

Author SHA1 Message Date
Gilles Boccon-Gibod 78a06ae8cf make implementation match the doc 2023-09-21 19:01:40 -07:00
2 changed files with 4 additions and 8 deletions
+1 -3
View File
@@ -2758,9 +2758,7 @@ class Device(CompositeEventEmitter):
self.abort_on(
'flush',
self.start_advertising(
advertising_type=self.advertising_type,
own_address_type=self.advertising_own_address_type,
auto_restart=True,
advertising_type=self.advertising_type, auto_restart=True
),
)
+3 -5
View File
@@ -31,14 +31,12 @@ async def open_ws_client_transport(spec: str) -> Transport:
'''
Open a WebSocket client transport.
The parameter string has this syntax:
<remote-host>:<remote-port>
<websocket-url>
Example: 127.0.0.1:9001
Example: ws://localhost:7681/v1/websocket/bt
'''
remote_host, remote_port = spec.split(':')
uri = f'ws://{remote_host}:{remote_port}'
websocket = await websockets.client.connect(uri)
websocket = await websockets.client.connect(spec)
transport = PumpedTransport(
PumpedPacketSource(websocket.recv),