ktor-websockets / io.ktor.websocket / WebSocketServerSession

WebSocketServerSession

interface WebSocketServerSession : WebSocketSession

Represents a server-side web socket session

Properties

call

abstract val call: ApplicationCall

Associated received call that originating this session

Extension Properties

application

val WebSocketServerSession.application: Application

An application that started this web socket session

Extension Functions

pinger

fun CoroutineScope.pinger(outgoing: SendChannel<Frame>, period: Duration, timeout: Duration, pool: ObjectPool<ByteBuffer> = KtorDefaultPool): SendChannel<Pong>

Launch pinger coroutine on CoroutineScope that is sending ping every specified period to outgoing channel, waiting for and verifying client's pong frames. It is also handling timeout and sending timeout close frame

pinger

fun CoroutineScope.pinger(outgoing: SendChannel<Frame>, period: <ERROR CLASS>, timeout: <ERROR CLASS>, pool: ObjectPool<ByteBuffer> = KtorDefaultPool): SendChannel<Pong>

Launch pinger coroutine on CoroutineScope that is sending ping every specified period to outgoing channel, waiting for and verifying client's pong frames. It is also handling timeout and sending timeout close frame

Inheritors

DefaultWebSocketServerSession

interface DefaultWebSocketServerSession : DefaultWebSocketSession, WebSocketServerSession

Represents a server-side web socket session with all default implementations