KSSLSocket

@Blocking
interface KSSLSocket : KSocket

Functions

Link copied to clipboard
Link copied to clipboard
abstract suspend fun bind(local: SocketAddress? = null)

Binds the socket to a local address. If the address is null, then the system will pick up an ephemeral port and a valid local address to bind the socket.

Link copied to clipboard
abstract suspend override fun close()

Closes the socket.

Link copied to clipboard
abstract suspend fun connect(endpoint: SocketAddress, timeout: Long = 0)

Connects this channel.

Link copied to clipboard
abstract suspend fun getApplicationProtocol(): String?
Link copied to clipboard
abstract suspend fun getChannel(): AsynchronousSocketChannel

Gets the underlying AsynchronousSocketChannel.

Link copied to clipboard
abstract suspend fun getEnabledCipherSuites(): Array<String>
Link copied to clipboard
abstract suspend fun getEnabledProtocols(): Array<String>
Link copied to clipboard
abstract suspend fun getEnableSessionCreation(): Boolean
Link copied to clipboard
abstract suspend fun getHandshakeApplicationProtocol(): String?
Link copied to clipboard
abstract suspend fun getHandshakeSession(): SSLSession
Link copied to clipboard
abstract suspend fun getInetAddress(): InetAddress?

Gets the remote InetAddress.

Link copied to clipboard
abstract suspend fun getInputStream(): KInputStream

Gets the input stream of the socket.

Link copied to clipboard
abstract suspend fun getKeepAlive(): Boolean

Gets the SO_KEEPALIVE option.

Link copied to clipboard
abstract suspend fun getLocalAddress(): InetAddress?

Gets the local InetAddress.

Link copied to clipboard
abstract suspend fun getLocalPort(): Int

Gets the local port number.

Link copied to clipboard
abstract suspend fun getLocalSocketAddress(): SocketAddress?

Gets the local socket address.

Link copied to clipboard
abstract suspend fun getNeedClientAuth(): Boolean
Link copied to clipboard
abstract suspend fun getOutputStream(): KOutputStream

Gets the output stream of the socket.

Link copied to clipboard
abstract suspend fun getPort(): Int

Gets the remote port number.

Link copied to clipboard
abstract suspend fun getReadTimeout(): Long

Gets the read timeout.

Link copied to clipboard
abstract suspend fun getReceiveBufferSize(): Int

Gets the SO_RCVBUF option.

Link copied to clipboard
abstract suspend fun getRemoteSocketAddress(): SocketAddress

Gets the remote socket address.

Link copied to clipboard
abstract suspend fun getReuseAddress(): Boolean

Gets the SO_REUSEADDR option.

Link copied to clipboard
abstract suspend fun getSendBufferSize(): Int

Gets the SO_SNDBUF option.

Link copied to clipboard
abstract suspend fun getSession(): SSLSession
Link copied to clipboard
abstract suspend fun getSoLinger(): Int

Gets the SO_LINGER option.

Link copied to clipboard
abstract suspend fun getSSLParameters(): SSLParameters
Link copied to clipboard
abstract suspend fun getSupportedCipherSuites(): Array<String>
Link copied to clipboard
abstract suspend fun getSupportedProtocols(): Array<String>
Link copied to clipboard
abstract suspend fun getTcpNoDelay(): Boolean

Gets the TCP_NODELAY option.

Link copied to clipboard
abstract suspend fun getUseClientMode(): Boolean
Link copied to clipboard
abstract suspend fun getWantClientAuth(): Boolean
Link copied to clipboard
abstract suspend fun getWriteTimeout(): Long

Gets the write timeout.

Link copied to clipboard
abstract suspend fun isBound(): Boolean

Checks if the socket is bound.

Link copied to clipboard
abstract suspend fun isClosed(): Boolean

Checks if the socket is closed.

Link copied to clipboard
abstract suspend fun isConnected(): Boolean

Checks if the socket is connected.

Link copied to clipboard
abstract suspend fun isInputShutdown(): Boolean

Checks if the input is shutdown.

Link copied to clipboard
abstract suspend fun isOutputShutdown(): Boolean

Checks if the output is shutdown.

Link copied to clipboard
Link copied to clipboard
abstract suspend fun setEnabledCipherSuites(suites: Array<String>)
Link copied to clipboard
abstract suspend fun setEnabledProtocols(protocols: Array<String>)
Link copied to clipboard
abstract suspend fun setEnableSessionCreation(flag: Boolean)
Link copied to clipboard
abstract suspend fun setKeepAlive(keepAlive: Boolean)

Sets the SO_KEEPALIVE option.

Link copied to clipboard
abstract suspend fun setNeedClientAuth(need: Boolean)
Link copied to clipboard
abstract suspend fun setReadTimeout(timeout: Long?)

Sets the read timeout.

Link copied to clipboard
abstract suspend fun setReceiveBufferSize(size: Int)

Sets the SO_RCVBUF option.

Link copied to clipboard
abstract suspend fun setReuseAddress(reuse: Boolean)

Sets the SO_REUSEADDR option.

Link copied to clipboard
abstract suspend fun setSendBufferSize(size: Int)

Sets the SO_SNDBUF option.

Link copied to clipboard
abstract suspend fun setSSLParameters(params: SSLParameters)
Link copied to clipboard
abstract suspend fun setTcpNoDelay(on: Boolean)

Sets the TCP_NODELAY option.

Link copied to clipboard
abstract suspend fun setUseClientMode(mode: Boolean)
Link copied to clipboard
abstract suspend fun setWantClientAuth(want: Boolean)
Link copied to clipboard
abstract suspend fun setWriteTimeout(timeout: Long?)

Sets the write timeout.

Link copied to clipboard
abstract suspend fun shutdownInput()

Shuts down the input side of the socket.

Link copied to clipboard
abstract suspend fun shutdownOutput()

Shuts down the output side of the socket.

Link copied to clipboard
abstract suspend fun startHandshake()