connect

fun connect(listener: TelnyxClient, providedHostAddress: String? = Config.TELNYX_PROD_HOST_ADDRESS, providedPort: Int? = Config.TELNYX_PORT, pushmetaData: PushMetaData? = null, onConnected: (Boolean) -> Unit = {}): Job

Connects to the socket with the provided Host Address and Port which were used to create an instance of TxSocket

Parameters

listener

the TelnyxClient used to create an instance of TxSocket that contains our relevant listener methods via the TxSocketListener interface

providedHostAddress

the host address specified when connecting, will default to Telnyx Production Host if not specified.

providedPort

the port specified when connecting, will use default Telnyx Port if not specified.

See also