MCPcopy Create free account
hub / github.com/cloudwego/netpoll / WriteDirect

Method WriteDirect

connection_impl.go:309–314  ·  view source on GitHub ↗

WriteDirect implements Connection.

(p []byte, remainCap int)

Source from the content-addressed store, hash-verified

307
308// WriteDirect implements Connection.
309func (c *connection) WriteDirect(p []byte, remainCap int) (err error) {
310 if !c.IsActive() {
311 return Exception(ErrConnClosed, "when write direct")
312 }
313 return c.outputBuffer.WriteDirect(p, remainCap)
314}
315
316// WriteByte implements Connection.
317func (c *connection) WriteByte(b byte) (err error) {

Callers 1

TestWriterAfterCloseFunction · 0.95

Calls 3

IsActiveMethod · 0.95
ExceptionFunction · 0.85
WriteDirectMethod · 0.65

Tested by 1

TestWriterAfterCloseFunction · 0.76