tls

suspend fun Socket.tls(coroutineContext: CoroutineContext): Socket

Make Socket connection secure with TLS.

TODO: report YT issue

Report a problem


suspend fun Connection.tls(coroutineContext: CoroutineContext, config: TLSConfig): Socket
expect suspend fun Socket.tls(coroutineContext: CoroutineContext, config: TLSConfig): Socket

Make Socket connection secure with TLS using TLSConfig.

Report a problem


suspend fun Connection.tls(coroutineContext: CoroutineContext): Socket

Make Socket connection secure with TLS.

Report a problem


suspend fun Connection.tls(coroutineContext: CoroutineContext, block: TLSConfigBuilder.() -> Unit): Socket
expect suspend fun Socket.tls(coroutineContext: CoroutineContext, block: TLSConfigBuilder.() -> Unit): Socket

Make Socket connection secure with TLS configured with block.

Report a problem

suspend fun Socket.tls(    coroutineContext: CoroutineContext,     trustManager: X509TrustManager? = null,     randomAlgorithm: String = "NativePRNGNonBlocking",     cipherSuites: List<<Error class: unknown class>> = CIOCipherSuites.SupportedSuites,     serverName: String? = null): Socket

Make Socket connection secure with TLS.

The coroutine context passed here will receive errors when there are no other handlers to process it (for example, in case of a shutdown during a TLS handshake). The context may also be used for cancellation.

Note that the context passed here is rarely a child of the scope in which the method is called, because it is not usually a decomposition of the parent task. If it is a child, errors may be propogated to the parent's coroutine exception handler rather than being caught and handled via a try-catch block.

Report a problem


actual suspend fun Socket.tls(coroutineContext: CoroutineContext, config: TLSConfig): Socket

Make Socket connection secure with TLS using TLSConfig.

The coroutine context passed here will receive errors when there are no other handlers to process it (for example, in case of a shutdown during a TLS handshake). The context may also be used for cancellation.

Note that the context passed here is rarely a child of the scope in which the method is called, because it is not usually a decomposition of the parent task. If it is a child, errors may be propogated to the parent's coroutine exception handler rather than being caught and handled via a try-catch block.

Report a problem


actual suspend fun Socket.tls(coroutineContext: CoroutineContext, block: TLSConfigBuilder.() -> Unit): Socket

Make Socket connection secure with TLS configured with block.

The coroutine context passed here will receive errors when there are no other handlers to process it (for example, in case of a shutdown during a TLS handshake). The context may also be used for cancellation.

Note that the context passed here is rarely a child of the scope in which the method is called, because it is not usually a decomposition of the parent task. If it is a child, errors may be propogated to the parent's coroutine exception handler rather than being caught and handled via a try-catch block.

Report a problem

actual suspend fun Socket.tls(coroutineContext: CoroutineContext, config: TLSConfig): Socket

Make Socket connection secure with TLS using TLSConfig.

Report a problem


actual suspend fun Socket.tls(coroutineContext: CoroutineContext, block: TLSConfigBuilder.() -> Unit): Socket

Make Socket connection secure with TLS configured with block.

Report a problem