MCPcopy Index your code
hub / github.com/coder/websocket / randMessage

Function randMessage

internal/test/wstest/echo.go:84–89  ·  view source on GitHub ↗
(typ websocket.MessageType, n int)

Source from the content-addressed store, hash-verified

82}
83
84func randMessage(typ websocket.MessageType, n int) []byte {
85 if typ == websocket.MessageBinary {
86 return xrand.Bytes(n)
87 }
88 return []byte(xrand.String(n))
89}

Callers 1

EchoFunction · 0.85

Calls 2

BytesFunction · 0.92
StringFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…