code: func (c *jsonCodec) Write(ctx context.Context, v interface{}) error {
  	c.encMu.Lock()
  	defer c.encMu.Unlock()
  
  	deadline, ok := ctx.Deadline()
  	if !ok {
  		deadline = time.Now().Add(defaultWriteTimeout)
  	}
  	c.conn.SetWriteDeadline(deadline)
  	return c.encode(v)
  }
docs: // Write sends a message to client.