MCPcopy
hub / github.com/hwholiday/learning_tools / send

Method send

istio/gateway/ws_conn.go:76–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74 }
75}
76func (w *WsConnection) send() {
77 for {
78 select {
79 case message := <-w.writeChan:
80 writer, err := w.ws.NextWriter(websocket.TextMessage)
81 if err != nil {
82 w.close()
83 return
84 }
85 _, _ = writer.Write(message)
86 _ = writer.Close()
87 case <-w.closeChan:
88 return
89 }
90 }
91}
92
93func (w *WsConnection) ReadMsg() (message []byte, err error) {
94 select {

Callers 1

NewWsConnectionFunction · 0.95

Calls 3

closeMethod · 0.95
WriteMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected