MCPcopy Index your code
hub / github.com/gotify/server / startReading

Function startReading

api/stream/stream_test.go:531–544  ·  view source on GitHub ↗
(client *testingClient)

Source from the content-addressed store, hash-verified

529}
530
531func startReading(client *testingClient) {
532 go func() {
533 for {
534 _, payload, err := client.conn.ReadMessage()
535 if err != nil {
536 return
537 }
538
539 actual := &model.MessageExternal{}
540 json.NewDecoder(bytes.NewBuffer(payload)).Decode(actual)
541 client.readMessage <- *actual
542 }
543 }()
544}
545
546func createClient(t *testing.T, url string) *testingClient {
547 ws, _, err := websocket.DefaultDialer.Dial(url, nil)

Callers 2

TestPingFunction · 0.85
testClientFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…