WsSession.kt

  1. package com.hexagonkt.http.model.ws

  2. import com.hexagonkt.http.model.HttpRequestPort
  3. import java.net.URI

  4. interface WsSession {
  5.     val uri: URI

  6.     val attributes: Map<*, *>
  7.     val request: HttpRequestPort
  8.     val exception: Exception?
  9.     val pathParameters: Map<String, String>

  10.     fun send(data: ByteArray)
  11.     fun send(text: String)
  12.     fun ping(data: ByteArray)
  13.     fun pong(data: ByteArray)
  14.     fun close(status: Int = NORMAL, reason: String = "")
  15. }