NativeSocket

Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class Endpoint(val ip: NativeSocket.IP, val port: Int)
Link copied to clipboard
class IP(val data: UByteArray)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
fun bind(host: String, port: Int, backlog: Int = 10)
Link copied to clipboard
fun close()
Link copied to clipboard
fun connect(host: String, port: Int)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun recv(count: Int): ByteArray
fun recv(data: ByteArray, offset: Int = 0, count: Int = data.size - offset): Int
Link copied to clipboard
fun send(data: ByteArray, offset: Int = 0, count: Int = data.size - offset)
Link copied to clipboard
fun CPointer<sockaddr_in>.set(ip: NativeSocket.IP, port: Int)
Link copied to clipboard
suspend fun NativeSocket.suspendRecvExact(data: ByteArray, offset: Int = 0, count: Int = data.size - offset): Int
Link copied to clipboard
suspend fun NativeSocket.suspendRecvUpTo(data: ByteArray, offset: Int = 0, count: Int = data.size - offset): Int
Link copied to clipboard
suspend fun NativeSocket.suspendSend(data: ByteArray, offset: Int = 0, count: Int = data.size - offset)
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
Link copied to clipboard
fun tryRecv(count: Int): ByteArray?
fun tryRecv(data: ByteArray, offset: Int = 0, count: Int = data.size - offset): Int