Skip to content

Commit

Permalink
Remove the deprecated JsWebSocketClientAdapter
Browse files Browse the repository at this point in the history
Resolves:
#453
  • Loading branch information
joffrey-bion committed Feb 16, 2024
1 parent c442e71 commit 56d82b7
Showing 1 changed file with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,6 @@ object BrowserWebSocketClient : JsWebSocketClient {
}
}

@Deprecated("This class is kept for backwards compatibility but will be removed in the future. " +
"Prefer subclassing JsWebSocketClient, but note that it's not stable for inheritance by 3rd parties.")
open class JsWebSocketClientAdapter(
/**
* A function to create [WebSocket] connections from a given URL.
*/
private val newWebSocket: (String) -> WebSocket,
) : WebSocketClient by object : JsWebSocketClient {
override fun newWebSocket(url: String, headers: Map<String, String>): WebSocket {
require(headers.isEmpty()) {
"custom HTTP headers are not supported by this JS client"
}
return newWebSocket(url)
}
}

/**
* A [WebSocketClient] adapting JavaScript [WebSocket] objects to [WebSocketConnection]s.
*
Expand Down

0 comments on commit 56d82b7

Please sign in to comment.