MCPcopy
hub / github.com/1Panel-dev/KubePi / Read

Method Read

thirdparty/gotty/server/ws_wrapper.go:20–33  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

18}
19
20func (wsw *wsWrapper) Read(p []byte) (n int, err error) {
21 for {
22 msgType, reader, err := wsw.Conn.NextReader()
23 if err != nil {
24 return 0, err
25 }
26
27 if msgType != websocket.TextMessage {
28 continue
29 }
30
31 return reader.Read(p)
32 }
33}

Callers 3

TestWriteFromPTYFunction · 0.45
TestWriteFromConnFunction · 0.45
RunMethod · 0.45

Calls

no outgoing calls

Tested by 2

TestWriteFromPTYFunction · 0.36
TestWriteFromConnFunction · 0.36