use

fun use(block: suspend SocketSession.() -> Unit): SocketBuilder

Adds middleware to the WebSocket session.

Middleware is applied before the session is opened.

Return

The SocketBuilder instance for chaining.

Parameters

block

A suspend function that can modify the session.