extensionOrNull

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

Search the extensions using WebSocketExtensionFactory.

Return

extension instance or null if the extension is not installed.