MCPcopy Create free account
hub / github.com/callstackincubator/react-native-fast-io / message

Function message

example/server/createServer.ts:47–62  ·  view source on GitHub ↗
(ws, message: string)

Source from the content-addressed store, hash-verified

45 },
46 websocket: {
47 message(ws, message: string) {
48 if (typeof message !== 'string') {
49 return
50 }
51 const count = parseInt(message)
52 if (isNaN(count)) {
53 return
54 }
55 try {
56 for (let i = 0; i < count; i++) {
57 ws.send(payload)
58 }
59 } catch (error) {
60 console.error('Failed to parse message:', error)
61 }
62 },
63 },
64 port,
65 })

Callers

nothing calls this directly

Calls 1

sendMethod · 0.65

Tested by

no test coverage detected