vuer.base
default_handler
websocket_handler
handle_file_request
Server
Base TCP server with HTTP/WebSocket functionality.
This class provides the core server infrastructure for Vuer, including:
- HTTP route handling with CORS support
- WebSocket connection management
- SSL/TLS support for secure connections
- Static file serving
Subclasses should call _init_app() in their post_init to initialize the aiohttp application before using server methods.
Note: This class cannot use @proto.prefix because Vuer inherits from it and also uses @proto.prefix, which causes a metaclass conflict.
Attributes: host: Server hostname. Set to "0.0.0.0" to accept remote connections. port: Server port number. cors: Comma-separated list of allowed CORS origins. Use "*" for all. cert: Path to SSL certificate file for HTTPS. key: Path to SSL private key file for HTTPS. ca_cert: Path to CA certificate for client certificate verification. WEBSOCKET_MAX_SIZE: Maximum WebSocket message size (default 256MB). REQUEST_MAX_SIZE: Maximum HTTP request size (default 256MB).