JettyWebSocketAdapter

@WebSocket
class JettyWebSocketAdapter(uri: URI, onConnect: WsSession.() -> Unit, onBinary: WsSession.(data: ByteArray) -> Unit, onText: WsSession.(text: String) -> Unit, onPing: WsSession.(data: ByteArray) -> Unit, onPong: WsSession.(data: ByteArray) -> Unit, onClose: WsSession.(status: Int, reason: String) -> Unit)

Constructors

Link copied to clipboard
constructor(uri: URI, onConnect: WsSession.() -> Unit, onBinary: WsSession.(data: ByteArray) -> Unit, onText: WsSession.(text: String) -> Unit, onPing: WsSession.(data: ByteArray) -> Unit, onPong: WsSession.(data: ByteArray) -> Unit, onClose: WsSession.(status: Int, reason: String) -> Unit)

Functions

Link copied to clipboard
@OnWebSocketMessage
fun onWebSocketBinary(session: Session, payload: ByteBuffer, callback: Callback)
Link copied to clipboard
@OnWebSocketClose
fun onWebSocketClose(session: Session, statusCode: Int, reason: String)
Link copied to clipboard
@OnWebSocketOpen
fun onWebSocketConnect(connectSession: Session)
Link copied to clipboard
@OnWebSocketMessage
fun onWebSocketText(session: Session, message: String)