MCPcopy
hub / github.com/nats-io/nats.go / Write

Method Write

nats.go:6701–6706  ·  view source on GitHub ↗

Write implements the io.Writer interface.

(p []byte)

Source from the content-addressed store, hash-verified

6699
6700// Write implements the io.Writer interface.
6701func (tw *timeoutWriter) Write(p []byte) (int, error) {
6702 tw.conn.SetWriteDeadline(time.Now().Add(tw.timeout))
6703 n, err := tw.conn.Write(p)
6704 tw.conn.SetWriteDeadline(time.Time{})
6705 return n, err
6706}

Callers 6

headerBytesMethod · 0.45
appendBufsMethod · 0.45
writeDirectMethod · 0.45
flushMethod · 0.45
flushPendingBufferMethod · 0.45

Calls 2

SetWriteDeadlineMethod · 0.80
AddMethod · 0.65

Tested by 1