connect#
- ansys.sherlock.core.launcher.connect(port=9090, timeout=120, transport_mode='mtls', certs_dir=None, uds_dir=None, uds_id=None)#
Connect to a local instance of Sherlock.
Available Since: 2025R2
- Parameters:
port (
int) – int, optional: Port number for the connection (ignored if transport_mode is “uds”). Default is 9090.timeout – int, optional: Maximum time (in seconds) to wait for the connection to Sherlock to be established. Default is 120 seconds.
transport_mode (
str) – Seelaunch_and_connect()for usage.certs_dir (
str) – str, optional: Directory containing the mTLS certificates. Default is “./certs”.uds_dir (
str) – Directory for the UDS socket file.uds_id (
str) – Optional ID for the UDS socket file.
- Return type:
Sherlock- Returns:
- :
SherlockThe instance of Sherlock.
Examples
>>> from ansys.sherlock.core import launcher >>> ansys_install_path = launcher.launch( >>> port=9092, year=2026, release_number=1, transport_mode="wnua") >>> sherlock = launcher.connect(port=9092, timeout=60, transport_mode="wnua")