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

Method WriteString

connection_impl.go:293–298  ·  view source on GitHub ↗

WriteString implements Connection.

(s string)

Source from the content-addressed store, hash-verified

291
292// WriteString implements Connection.
293func (c *connection) WriteString(s string) (n int, err error) {
294 if !c.IsActive() {
295 return 0, Exception(ErrConnClosed, "when write string")
296 }
297 return c.outputBuffer.WriteString(s)
298}
299
300// WriteBinary implements Connection.
301func (c *connection) WriteBinary(b []byte) (n int, err error) {

Callers 1

TestWriterAfterCloseFunction · 0.95

Calls 3

IsActiveMethod · 0.95
ExceptionFunction · 0.85
WriteStringMethod · 0.65

Tested by 1

TestWriterAfterCloseFunction · 0.76