Skip to main content
Version: v10.0.0

createSocketReporter

Reports what happens to one socket: its connection, the messages it receives and sends, and its errors. Returns the snapshot to send whenever HyperFlow connects, and the cleanup.


Import
import { createSocketReporter } from "@hyper-fetch/plugin-devtools"

Parameters​

createSocketReporter(__namedParameters: { report: Report; socket: SocketInstance; socketId: string })
Parameters
NameTypeDescription
__namedParameters
{ report: Report; socket: SocketInstance; socketId: string }

Returns​

createSocketReporter
NameTypeDescription
sendSnapshot
() => void

Tells HyperFlow about the socket and its current state

unmount
() => void