From 03fd8d8dfd86578df4f2db003040bcfa49bfe640 Mon Sep 17 00:00:00 2001 From: Henrik Date: Sat, 30 Dec 2023 23:33:16 +0100 Subject: [PATCH] Clean up old names in documentation, mention need to connect --- camilladsp/camilladsp.py | 4 ++++ docs/errors.md | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/camilladsp/camilladsp.py b/camilladsp/camilladsp.py index 965fe32..49d936b 100644 --- a/camilladsp/camilladsp.py +++ b/camilladsp/camilladsp.py @@ -878,6 +878,10 @@ def __init__(self, host: str, port: int): """ Create a new CamillaClient. + The newly created CamillaClient does not + automatically connect to the CamillaDSP process. + Call `connect()` to initiate the connection. + Args: host (str): Hostname where CamillaDSP runs. port (int): Port number of the CamillaDSP websocket server. diff --git a/docs/errors.md b/docs/errors.md index 91b2982..8c55f89 100644 --- a/docs/errors.md +++ b/docs/errors.md @@ -5,8 +5,8 @@ The custom exception [CamillaError][camilladsp.camilladsp.CamillaError] is raise Different exceptions are raised in different situations. Consider the following example: ```python -from camilladsp import CamillaConnection, CamillaError -cdsp = CamillaConnection("127.0.0.1", 1234) +from camilladsp import CamillaClient, CamillaError +cdsp = CamillaClient("127.0.0.1", 1234) myconfig = # get a config from somewhere try: @@ -19,9 +19,10 @@ except CamillaError as e: except IOError as e: print("Websocket is not connected:", e) ``` -- `ConnectionRefusedError` means that CamillaDSP isn't responding on the given host and port. +- `ConnectionRefusedError` means that CamillaDSP isn't responding on the given host and port. - `CamillaError` means that the command was sent and CamillaDSP replied with an error. -- `IOError` can mean a few things, but the most likely is that the websocket connection was lost. This happens if the CamillaDSP process exits or is restarted. +- `IOError` can mean a few things, but the most likely is that the websocket connection was lost. + This happens if the CamillaDSP process exits or is restarted. ## CamillaError ::: camilladsp.camilladsp.CamillaError \ No newline at end of file