MCPcopy
hub / github.com/XTLS/REALITY / write

Method write

conn.go:985–994  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

983}
984
985func (c *Conn) write(data []byte) (int, error) {
986 if c.buffering {
987 c.sendBuf = append(c.sendBuf, data...)
988 return len(data), nil
989 }
990
991 n, err := c.conn.Write(data)
992 c.bytesSent += int64(n)
993 return n, err
994}
995
996func (c *Conn) flush() (int, error) {
997 if len(c.sendBuf) == 0 {

Callers 2

writeRecordLockedMethod · 0.95
ServerFunction · 0.80

Calls 1

WriteMethod · 0.65

Tested by

no test coverage detected