Connect to a WebSocket server listening on a Unix socket. This function accepts the same keyword arguments as :func:`connect`. It's only available on Unix. It's mainly useful for debugging servers listening on Unix sockets. Args: path: File system path to the Unix so
(
path: str | None = None,
uri: str | None = None,
**kwargs: Any,
)
| 393 | |
| 394 | |
| 395 | def unix_connect( |
| 396 | path: str | None = None, |
| 397 | uri: str | None = None, |
| 398 | **kwargs: Any, |
| 399 | ) -> ClientConnection: |
| 400 | """ |
| 401 | Connect to a WebSocket server listening on a Unix socket. |
| 402 | |
| 403 | This function accepts the same keyword arguments as :func:`connect`. |
| 404 | |
| 405 | It's only available on Unix. |
| 406 | |
| 407 | It's mainly useful for debugging servers listening on Unix sockets. |
| 408 | |
| 409 | Args: |
| 410 | path: File system path to the Unix socket. |
| 411 | uri: URI of the WebSocket server. ``uri`` defaults to |
| 412 | ``ws://localhost/`` or, when a ``ssl`` is provided, to |
| 413 | ``wss://localhost/``. |
| 414 | |
| 415 | """ |
| 416 | if uri is None: |
| 417 | # Backwards compatibility: ssl used to be called ssl_context. |
| 418 | if kwargs.get("ssl") is None and kwargs.get("ssl_context") is None: |
| 419 | uri = "ws://localhost/" |
| 420 | else: |
| 421 | uri = "wss://localhost/" |
| 422 | return connect(uri=uri, unix=True, path=path, **kwargs) |
| 423 | |
| 424 | |
| 425 | try: |
searching dependent graphs…