code: func (handler *Handler) sendReceive(msg *pb.ChaincodeMessage, c chan pb.ChaincodeMessage) (pb.ChaincodeMessage, error) {
  	errc := make(chan error, 1)
  	handler.serialSendAsync(msg, errc)
  
  	//the serialsend above will send an err or nil
  	//the select filters that first error(or nil)
  	//and continues to wait for the response
  	//it is possible that the response triggers first
  	//in which case the errc obviously worked and is
  	//ignored
  	for {
  		select {
  		case err := <-errc:
  			if err == nil {
  				continue
  			}
  			//would have been logged, return false
  			return pb.ChaincodeMessage{}, err
  		case outmsg, val := <-c:
  			if !val {
  				return pb.ChaincodeMessage{}, errors.New("unexpected failure on receive")
  			}
  			return outmsg, nil
  		}
  	}
  }
docs: //sends a message and selects