PyDocs

Nav

Networking and Interprocess Communication

loop.create_server

asyncio

async methodnot WASI
  • loop.create_server(protocol_factory, host=None, port=None, *, family=socket.AF_UNSPEC, flags=socket.AI_PASSIVE, sock=None, backlog=100, ssl=None, reuse_address=None, reuse_port=None, keep_alive=None, ssl_handshake_timeout=None, ssl_shutdown_timeout=None, start_serving=True)
Create a TCP server (socket type SOCK_STREAM) listening on port of the host address.
Changed in 3.5, 3.5.1, 3.6, 3.11, 3.13
  • 3.5: Added support for SSL/TLS in ProactorEventLoop.
  • 3.5.1: The host parameter can be a sequence of strings.
  • 3.6: Added ssl_handshake_timeout and start_serving parameters. The socket option socket.TCP_NODELAY is set by default for all TCP connections.
  • 3.11: Added the ssl_shutdown_timeout parameter.
  • 3.13: Added the keep_alive parameter.
0 Examples
No examples for asyncio/loop.create_server.
See Also
No see-alsos for asyncio/loop.create_server
0 Notes
No notes for loop.create_server