Write writes the JSON message v to c. It will reuse buffers in between calls to avoid allocations.
(ctx context.Context, c *websocket.Conn, v any)
| 46 | // Write writes the JSON message v to c. |
| 47 | // It will reuse buffers in between calls to avoid allocations. |
| 48 | func Write(ctx context.Context, c *websocket.Conn, v any) error { |
| 49 | return write(ctx, c, v) |
| 50 | } |
| 51 | |
| 52 | func write(ctx context.Context, c *websocket.Conn, v any) (err error) { |
| 53 | defer errd.Wrap(&err, "failed to write JSON message") |
searching dependent graphs…