newMonitoredWebSocket
fun ERROR CLASS: Symbol not found for OkHttpClient.newMonitoredWebSocket(request: ERROR CLASS: Symbol not found for Request, listener: ERROR CLASS: Symbol not found for WebSocketListener): ERROR CLASS: Symbol not found for WebSocket
Opens a WebSocket like OkHttpClient.newWebSocket and additionally logs every frame sent and received (text, binary size, close) in KtorMonitorInterceptor, next to the handshake call.
The client must have KtorMonitorInterceptor installed with addInterceptor (OkHttp does not run network interceptors for WebSocket calls). Without the interceptor this behaves exactly like newWebSocket.
val webSocket = client.newMonitoredWebSocket(request, listener)Content copied to clipboard