New submission from Olaf van der Spek <[email protected]>:
Replace:
addr = server.sockets[0].getsockname()
print(f'Serving on {addr}')
By:
for socket in server.sockets:
addr = socket.getsockname()
print(f'Serving on {addr}')
https://docs.python.org/3/library/asyncio-stream.html
----------
assignee: docs@python
components: Documentation
messages: 403084
nosy: docs@python, olafvdspek
priority: normal
severity: normal
status: open
title: List all sockets in TCP echo server using streams
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue45351>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com