MCPcopy
hub / github.com/gofiber/fiber / Write

Method Write

helpers.go:859–867  ·  helpers.go::testConn.Write

Write implements net.Conn by appending to the buffered output.

(b []byte)

Source from the content-addressed store, hash-verified

857
858// Write implements net.Conn by appending to the buffered output.
859func (c *testConn) Write(b []byte) (int, error) {
860 c.Lock()
861 defer c.Unlock()
862
863 if c.isClosed {
864 return 0, errTestConnClosed
865 }
866 return c.w.Write(b) //nolint:wrapcheck // This must not be wrapped
867}
868
869// Close marks the connection as closed and prevents further writes.
870func (c *testConn) Close() error {

Callers 2

Calls 3

LockMethod · 0.65
UnlockMethod · 0.65
WriteMethod · 0.65

Tested by 2