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

Method WriteByte

nocopy.go:157–157  ·  view source on GitHub ↗

WriteByte is a faster implementation of Malloc when a byte needs to be written. It replaces: var buf, _ = Malloc(1) buf[0] = b

(b byte)

Source from the content-addressed store, hash-verified

155 // buf[0] = b
156 //
157 WriteByte(b byte) (err error)
158
159 // WriteDirect is used to insert an additional slice of data on the current write stream.
160 // For example, if you plan to execute:

Callers 4

WriteByteMethod · 0.65
WriteByteMethod · 0.65
TestLinkBufferResetTailFunction · 0.65
WriteByteMethod · 0.65

Implementers 4

zcWriternocopy_readwriter.go
UnsafeLinkBuffernocopy_linkbuffer.go
SafeLinkBuffernocopy_linkbuffer_race.go
connectionconnection_impl.go

Calls

no outgoing calls

Tested by 1

TestLinkBufferResetTailFunction · 0.52