code: func (c *Client) cmdsx(b *Box, format string, args ...interface{}) (*sx, error) {
  	c.io.mustBeLocked()
  	c.nextBox = b
  
  Trying:
  	for tries := 0; ; tries++ {
  		if c.rw == nil || !c.connected {
  			if !c.autoReconnect {
  				return nil, fmt.Errorf("not connected")
  			}
  			if err := c.reconnect(); err != nil {
  				return nil, err
  			}
  			if b != nil && c.nextBox == nil {
  				// box disappeared on reconnect
  				return nil, fmt.Errorf("box is gone")
  			}
  		}
  
  		if b != nil && !b.search && b != c.box {
  			if c.box != nil {
  				// TODO c.box.init = false
  			}
  			c.box = b
  			if _, err := c.cmdsx0("SELECT %s", iquote(b.Name)); err != nil {
  				c.box = nil
  				if tries++; tries == 1 && (c.rw == nil || !c.connected) {
  					continue Trying
  				}
  				return nil, err
  			}
  		}
  		if b != nil {
  			c.box = b
  		}
  
  		x, err := c.cmdsx0(format, args...)
  		if err != nil {
  			if tries++; tries == 1 && (c.rw == nil || !c.connected) {
  				continue Trying
  			}
  			return nil, err
  		}
  		return x, nil
  	}
  	panic("not reached")
  }
docs: // cmdsx runs a command on box b.  It does redial.