anchor.diff:  void publish(MqttClient c, MqttPubOptions mqttOptions) {
     c.publish(mqttOptions.topic, mqttOptions.payload, mqttOptions.messageID, mqttOptions.QoS, mqttOptions.retain)
         .then( (m) {
  +          print("published !");
           print("Message ${m.messageID} published");
           if (mqttOptions.willTopic == null) {    // if a WILL is defined, don't disconnect to have the will sent
             c.disconnect();
  
positive.code:   int willQoS = QOS_0;
    bool willRetain = false;
    
     void displayOptionsHelp() {
      optionList.forEach((k,v) =>   print("${k} :  ${v}"));
      exit(0);
    }
    bool setOption(String option, [String value = null]) {
      bool valueUsed = true;
  
      switch (option) {
        case '-?': 
          displayOptionsHelp();
          valueUsed = false;
          break;
        case '-d': 
          valueUsed = false;
          debugMessage = true;
          break;
        case '-h': 
          host = value;
          break;
        case '-p': 
          port = int.parse(value);
          break;
        case '--url':
          url = value;
          break;
        case '-c':
          clientID = value;
          break;
        case '-i':
          messageID = int.parse(value);
          break;
        case '-t': 
          topic = value;
          break;
        case '-m': 
          payload = value;
          break;
        case '-q': 
          QoS = int.parse(value);
          break;
        case '-r':
          valueUsed = false;
          retain = true;
          break;
        case '-u': 
          user = value;
          break;
        case '-P': 
          password = value;
          break;
        case '--will-payload': 
          willPayload = value;
          break;
        case '--will-qos': 
          willQoS = int.parse(value);
          break;
        case '--will-retain': 
          valueUsed = false;
          willRetain = true;
          break;
        case '--will-topic':
          willTopic = value;
          break;
        default: 
            print("Unknown option $option");
            displayOptionsHelp();
            exit(-1);
           break;
      }
      
      return valueUsed;
    }
      
  }
  main() {
    Options options = new Options();
    MqttPubOptions mqttOptions = new MqttPubOptions();
    
    for (int i=0; i < options.arguments.length; i++) {
      if (options.arguments[i].startsWith("-") && MqttPubOptions.optionList.containsKey(options.arguments[i])) {
        if (mqttOptions.setOption(options.arguments[i], ( (options.arguments.length > i + 1) ? options.arguments[i+1] : null ) ) ) {
          i++;
        }
      }
    }
    
    VirtualMqttConnection mqttCnx;
    
    if (mqttOptions.url == null) {  // socket connection
  
negative.code:  *  -q quality of service. Default is 0
   *  -r message should be retained
   *  -u provide a username
   *  -p provide a password
   *  --willMessage payload for the client will
   *  --willQos  quality of service for the client will
   *  --willRetain if provided, make the client will retain
   *  --willTopic the topic on which to publish the client will
   *  
   *  [ADD CERTICATE / ENCRYPTION support]
   *  
   */
  
  class MqttPubOptions {
  
    
    bool debugMessage = false;
    String host = '127.0.0.1';
  