MCPcopy
hub / github.com/coder/websocket / writer

Method writer

write.go:95–101  ·  view source on GitHub ↗
(ctx context.Context, typ MessageType)

Source from the content-addressed store, hash-verified

93}
94
95func (c *Conn) writer(ctx context.Context, typ MessageType) (io.WriteCloser, error) {
96 err := c.msgWriter.reset(ctx, typ)
97 if err != nil {
98 return nil, err
99 }
100 return c.msgWriter, nil
101}
102
103func (c *Conn) write(ctx context.Context, typ MessageType, p []byte) (int, error) {
104 err := c.msgWriter.reset(ctx, typ)

Callers 1

WriterMethod · 0.95

Calls 1

resetMethod · 0.45

Tested by

no test coverage detected