MCPcopy Create free account
hub / github.com/LagrangeDev/LagrangeGo / Write

Method Write

client/internal/network/conn.go:52–63  ·  view source on GitHub ↗
(buf []byte)

Source from the content-addressed store, hash-verified

50}
51
52func (t *TCPClient) Write(buf []byte) error {
53 if conn := t.getConn(); conn != nil {
54 _, err := conn.Write(buf)
55 if err != nil {
56 t.unexpectedClose(err)
57 return ErrConnectionClosed
58 }
59 return nil
60 }
61
62 return ErrConnectionClosed
63}
64
65func (t *TCPClient) ReadBytes(l int) ([]byte, error) {
66 buf := make([]byte, l)

Callers 4

uploadGroupAlbumBlockMethod · 0.45
uploadGroupNoticePicMethod · 0.45
sendPacketMethod · 0.45
initMethod · 0.45

Calls 2

getConnMethod · 0.95
unexpectedCloseMethod · 0.95

Tested by

no test coverage detected