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

Method flush

conn.go:996–1006  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

994}
995
996func (c *Conn) flush() (int, error) {
997 if len(c.sendBuf) == 0 {
998 return 0, nil
999 }
1000
1001 n, err := c.conn.Write(c.sendBuf)
1002 c.bytesSent += int64(n)
1003 c.sendBuf = nil
1004 c.buffering = false
1005 return n, err
1006}
1007
1008// outBufPool pools the record-sized scratch buffers used by writeRecordLocked.
1009var outBufPool = sync.Pool{

Callers 7

writeRecordLockedMethod · 0.95
handshakeContextMethod · 0.95
handshakeMethod · 0.80
handshakeMethod · 0.80
handshakeMethod · 0.80
handshakeMethod · 0.80
doFullHandshakeMethod · 0.80

Calls 1

WriteMethod · 0.65

Tested by

no test coverage detected