interface ABoundSocket
Represents a bound socket |
|
interface AConnectedSocket : AWritable
Represent a connected socket |
|
interface AReadable
Represent a readable socket |
|
interface ASocket : DisposableHandle
Base type for all async sockets |
|
interface AWritable
Represents a writable socket |
|
interface Acceptable<out S : ASocket> : ASocket
Represents a socket source, for example server socket |
|
interface BoundDatagramSocket : ASocket, ABoundSocket, AReadable, DatagramReadWriteChannel
Represents a bound datagram socket |
|
interface Configurable<out T : Configurable<T, Options>, Options : SocketOptions>
Represent a configurable socket |
|
interface ConnectedDatagramSocket : ASocket, ABoundSocket, AConnectedSocket, ReadWriteSocket, DatagramReadWriteChannel
Represents a connected datagram socket. |
|
class Connection
Represents a connected socket with its input and output |
|
class Datagram
|
|
interface DatagramReadChannel
A channel for receiving datagrams |
|
interface DatagramReadWriteChannel : DatagramReadChannel, DatagramWriteChannel
A channel for sending and receiving datagrams |
|
interface DatagramWriteChannel
A channel for sending datagrams |
|
interface ReadWriteSocket : ASocket, AReadable, AWritable
Represents both readable and writable socket |
|
interface ServerSocket : ASocket, ABoundSocket, Acceptable<Socket>
Represents a server bound socket ready for accepting connections |
|
interface Socket : ReadWriteSocket, ABoundSocket, AConnectedSocket
Represents a connected socket |
|
class SocketBuilder : Configurable<SocketBuilder, SocketOptions>
Socket builder |
|
sealed class SocketOptions
Socket options builder |
|
expect class SocketTimeoutException |
|
class TcpSocketBuilder : Configurable<TcpSocketBuilder, SocketOptions>
TCP socket builder |
|
class TypeOfService
An inline class to hold a IP ToS value |
|
class UDPSocketBuilder : Configurable<UDPSocketBuilder, UDPSocketOptions>
UDP socket builder |
actual typealias SocketTimeoutException = SocketTimeoutException |
val ASocket.isClosed: Boolean
Check if the socket is closed |
fun aSocket(selector: SelectorManager): SocketBuilder
Start building a socket |
|
suspend fun ASocket.awaitClosed(): Unit
Await until socket close |
|
suspend fun TcpSocketBuilder.connect(remoteAddress: SocketAddress, configure: TCPClientSocketOptions.() -> Unit = {}): Socket |
|
fun Socket.connection(): Connection
Opens socket input and output channels and returns connection object |
|
fun AReadable.openReadChannel(): ByteReadChannel
Open a read channel, could be done only once |
|
fun AWritable.openWriteChannel(autoFlush: Boolean = false): ByteWriteChannel
Open a write channel, could be opened only once |
|
fun <T : Configurable<T, *>> T.tcpNoDelay(): T
Set TCP_NODELAY socket option to disable the Nagle algorithm. |