MCPcopy Index your code
hub / github.com/subtrace/subtrace / Send

Method Send

devtools/devtools.go:123–133  ·  view source on GitHub ↗
(b []byte)

Source from the content-addressed store, hash-verified

121}
122
123func (s *Server) Send(b []byte) {
124 var wg sync.WaitGroup
125 for _, conn := range s.snapshot() {
126 wg.Add(1)
127 go func() {
128 defer wg.Done()
129 conn.Write(context.Background(), websocket.MessageBinary, b)
130 }()
131 }
132 wg.Wait()
133}
134
135func (s *Server) websocket(w http.ResponseWriter, r *http.Request) {
136 conn, err := websocket.Accept(w, r, &websocket.AcceptOptions{InsecureSkipVerify: true})

Callers 1

FinishMethod · 0.80

Calls 5

snapshotMethod · 0.95
AddMethod · 0.80
WriteMethod · 0.80
DoneMethod · 0.65
WaitMethod · 0.45

Tested by

no test coverage detected