MCPcopy Index your code
hub / github.com/webpack/webpack-dev-server / sendMessage

Method sendMessage

lib/Server.js:3341–3348  ·  view source on GitHub ↗

* @param {ClientConnection[]} clients clients * @param {string} type type * @param {EXPECTED_ANY=} data data * @param {EXPECTED_ANY=} params params

(clients, type, data, params)

Source from the content-addressed store, hash-verified

3339 * @param {EXPECTED_ANY=} params params
3340 */
3341 sendMessage(clients, type, data, params) {
3342 for (const client of clients) {
3343 // `ws` uses `WebSocket.OPEN`, which is `1`
3344 if (client.readyState === 1) {
3345 client.send(JSON.stringify({ type, data, params }));
3346 }
3347 }
3348 }
3349
3350 // Send stats to a socket or multiple sockets
3351 /**

Callers 5

setupProgressPluginMethod · 0.95
setupHooksMethod · 0.95
createWebSocketServerMethod · 0.95
sendStatsMethod · 0.95
watchFilesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected