code: func (c *RPCClient) send(header *requestHeader, obj interface{}) error {
  	c.writeLock.Lock()
  	defer c.writeLock.Unlock()
  
  	if c.shutdown {
  		return clientClosed
  	}
  
  	// Setup an IO deadline, this way we won't wait indefinitely
  	// if the client has hung.
  	if err := c.conn.SetWriteDeadline(time.Now().Add(c.timeout)); err != nil {
  		return err
  	}
  
  	if err := c.enc.Encode(header); err != nil {
  		return err
  	}
  
  	if obj != nil {
  		if err := c.enc.Encode(obj); err != nil {
  			return err
  		}
  	}
  
  	if err := c.writer.Flush(); err != nil {
  		return err
  	}
  
  	return nil
  }
docs: // send is used to send an object using the MsgPack encoding. send
  // is serialized to prevent write overlaps, while properly buffering.