TcpTransport
TCP transport for MQTT over raw sockets with optional TLS.
TCP is stream-oriented, so receive must reconstruct MQTT packet boundaries by parsing the fixed header and Variable Byte Integer remaining length from the byte stream, then reading exactly that many payload bytes.
Parameters
configureTls
optional hook applied to ktor's TLSConfigBuilder during the TLS handshake, after the SNI server name is set and before platform trust is configured. Use it to trust a private or self-signed CA for this connection only. Ignored for non-TLS endpoints.