💬 WebSocket Inspector
Flocon captures all WebSocket communications made by your application, giving you complete visibility into live feeds, chats, and multiplayer events.
Overview
For every active WebSocket connection, Flocon records:
- Connection Lifecycle: Connection URL, handshake status, opening timestamps, and closure codes
- Frames: Sent and received text frames, binary payloads, and ping/pong heartbeats
- Order & Timestamps: Precise sequential message ordering with millisecond timestamps
Setup & Integration
With OkHttp (Android)
Flocon provides built-in WebSocket extension helpers for OkHttp:
val request = Request.Builder()
.url("wss://your-websocket-endpoint.com")
.build()
val myListener = object : WebSocketListener() {
override fun onMessage(webSocket: WebSocket, text: String) {
// Your handler
}
}
// Wraps the listener to record all incoming frames in Flocon
val webSocket = client.newWebSocket(
request,
myListener.listenWithFlocon(id = "wss://your-websocket-endpoint.com")
)
Manual Logging (Kotlin Multiplatform)
If you use custom WebSocket implementations (or multiplatform WebSocket engines), forward events directly via floconLogWebSocketEvent: