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

Method WriteByte

connection_impl.go:317–322  ·  view source on GitHub ↗

WriteByte implements Connection.

(b byte)

Source from the content-addressed store, hash-verified

315
316// WriteByte implements Connection.
317func (c *connection) WriteByte(b byte) (err error) {
318 if !c.IsActive() {
319 return Exception(ErrConnClosed, "when write byte")
320 }
321 return c.outputBuffer.WriteByte(b)
322}
323
324// ------------------------------------------ implement net.Conn ------------------------------------------
325

Callers 1

TestWriterAfterCloseFunction · 0.95

Calls 3

IsActiveMethod · 0.95
ExceptionFunction · 0.85
WriteByteMethod · 0.65

Tested by 1

TestWriterAfterCloseFunction · 0.76