Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/cameraDiscoveryExample.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ def main() -> None:
def process_event(event: DiscoveryEvent) -> None:
log.info('Service discovery event', type=event.type.name, service=event.service)

# Register the event handler to process discovery events
# Register the event handler
discoverer.register(process_event)

# Start the discoverer with the specified group
discoverer.start(group)

# Send the service query
# Send a service query to trigger advertisement from matching services
discoverer.discover(query)

shutdown_event.wait()
Expand Down
7 changes: 4 additions & 3 deletions examples/cameraServiceExample.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ def main() -> None:
group = Group(name='effective-range/sniper', url='udp://239.0.1.1:5555')

# Define the service information for the camera
info = ServiceInfo(uuid=uuid4(), name='er-sniper-camera-1', role='camera', urls={
'device-api': 'grpc://er-sniper-camera-1/device',
'video-stream': 'blob:http://er-sniper-camera-1/video'
hostname = 'er-sniper-camera-1'
info = ServiceInfo(uuid=uuid4(), name=hostname, role='camera', urls={
'api': f'grpc://{hostname}.local:50051',
'stream': f'http://{hostname}.local:8000'
})

# Use a scheduled advertizer to periodically announce the camera service
Expand Down
Loading