async def default_handler(request, ws)
Source
async def websocket_handler(request, handler, **ws_kwargs)
async def handle_file_request(request, root, filename=None)
class Server
Base TCP server
WEBSOCKET_MAX_SIZE: int = Proto(2 ** 28, env='WEBSOCKET_MAX_SIZE', help='maximum size for websocket requests.')
REQUEST_MAX_SIZE: int = Proto(2 ** 28, env='REQUEST_MAX_SIZE', help='maximum size for requests.')
def run(self)
host = Proto(env='HOST', default='localhost')
cors = Proto(help='Enable CORS', default='*')
port = Proto(env='PORT', default=8012)
cert = Proto(None, dtype=str, help='the path to the SSL certificate')
key = Proto(None, dtype=str, help='the path to the SSL key')
ca_cert = Proto(None, dtype=str, help='the trusted root CA certificates')