extension

fun <T : WebSocketExtension<*>> WebSocketSession.extension(extension: WebSocketExtensionFactory<*, T>): T

Find the extensions using WebSocketExtensionFactory.

Return

extension instance.

Throws

if the extension is not found.