Create a WebSocket server listening on a Unix socket. This function accepts the same keyword arguments as :func:`serve`. It's only available on Unix. It's useful for deploying a server behind a reverse proxy such as nginx. Args: handler: Connection handler. It receiv
(
handler: Callable[[ServerConnection], None],
path: str | None = None,
**kwargs: Any,
)
| 625 | |
| 626 | |
| 627 | def unix_serve( |
| 628 | handler: Callable[[ServerConnection], None], |
| 629 | path: str | None = None, |
| 630 | **kwargs: Any, |
| 631 | ) -> Server: |
| 632 | """ |
| 633 | Create a WebSocket server listening on a Unix socket. |
| 634 | |
| 635 | This function accepts the same keyword arguments as :func:`serve`. |
| 636 | |
| 637 | It's only available on Unix. |
| 638 | |
| 639 | It's useful for deploying a server behind a reverse proxy such as nginx. |
| 640 | |
| 641 | Args: |
| 642 | handler: Connection handler. It receives the WebSocket connection, |
| 643 | which is a :class:`ServerConnection`, in argument. |
| 644 | path: File system path to the Unix socket. |
| 645 | |
| 646 | """ |
| 647 | return serve(handler, unix=True, path=path, **kwargs) |
| 648 | |
| 649 | |
| 650 | def is_credentials(credentials: Any) -> bool: |
searching dependent graphs…