code: func (c *Client) receiveData() ([]byte, error) {
  	type recv struct {
  		msg []byte
  		err error
  	}
  
  	session := c.getSession()
  	if session == nil {
  		return nil, errors.New("not connected")
  	}
  
  	done := make(chan recv, 1)
  
  	go func() {
  		msg, err := session.Recv()
  		done <- recv{[]byte(msg), err}
  	}()
  
  	select {
  	case r := <-done:
  		return r.msg, r.err
  	case err := <-c.interrupt:
  		return nil, err
  	}
  }
docs: // receiveData reads a message from session.