#...............................................................................
#
#  IO Ninja IAS (In-App Scripting) API for Python
#

from typing import Any

def trace(*values: Any) -> None: ...
def is_connected() -> bool: ...
def connect() -> None: ...
def disconnect() -> None: ...
def transmit(data: bytes) -> int: ...
def get_pending_receive_size() -> int: ...
def receive(size: int, timeout: int = ...) -> bytes: ...
def unreceive(data: bytes) -> None: ...
def write_log(record_code: int, *args: Any) -> None: ...
def clear_log() -> None: ...

# inter-session messaging

def listen_to_messages(receiver_id: str) -> None: ...
def send_message(receiver_id: str, message_id: str, data: bytes) -> None: ...

# entry points (IAS event thread)

# def pretransmit(data: bytes) -> None: ...
# def on_log_record(timestamp: int, record_code: int, data: bytes) -> None: ...
# def on_message(message_id: str, data: bytes) -> None: ...
