On this page
  1. asyncio.start_server
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

asyncio.start_server

Prev: asyncio.sleep | Up: asyncio | Next: asyncio.start_unix_server
Rel: asyncio.AbstractEventLoop, asyncio.AbstractServer, asyncio.all_tasks, asyncio.as_completed
Ref: docs.python.org — asyncio.start_server
Tags: #public #python3 #stdlib #asyncio


Import

import asyncio
from asyncio import start_server

Signature & Overview

asyncio.start_server(client_connected_cb, host=None, port=None, *, limit=65536, **kwds)

Start a socket server, call back for each client connected.

Usage

import asyncio

# High-level TCP server:
# server = await asyncio.start_server(handle_client, "127.0.0.1", 0)
assert callable(asyncio.start_server)

Gotchas

REPL Inspect

from asyncio import start_server
help(start_server)

Linked from

Related notes