Package io.ktor.network.sockets
Types
interface ABoundSocket Represents a bound socket |
|
interface AConnectedSocket : AWritable Represent a connected socket |
|
interface AReadable Represent a readable socket |
|
interface ASocket : Closeable, DisposableHandle Base type for all async sockets |
|
interface AWritable Represents a writable socket |
|
Represents a socket source, for example server socket |
|
interface BoundDatagramSocket : Represents a bound datagram socket |
|
interface Configurable<out T : Configurable<T, O>, O : SocketOptions> Represent a configurable socket |
|
interface ConnectedDatagramSocket : Represents a connected datagram socket. |
|
class Datagram |
|
interface DatagramReadChannel A channel for receiving datagrams |
|
interface DatagramReadWriteChannel : A channel for sending and receiving datagrams |
|
interface DatagramWriteChannel A channel for sending datagrams |
|
Represents both readable and writable socket |
|
interface ServerSocket : Represents a server bound socket ready for accepting connections |
|
interface Socket : Represents a connected socket |
|
class SocketBuilder : Socket builder |
|
sealed class SocketOptions Socket options builder |
|
class TcpSocketBuilder : TCP socket builder |
|
class TypeOfService An inline class to hold a IP ToS value |
|
class UDPSocketBuilder : UDP socket builder |
Properties
Check if the socket is closed |
Functions
fun aSocket(selector: SelectorManager): SocketBuilder Start building a socket |
|
Await until socket close |
|
fun AReadable.openReadChannel(): ByteReadChannel Open a read channel, could be done only once |
|
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. |