title: MQTT TLS session resumption in C
body: <p>I'm using the Eclipse Paho MQTT C client to connect to a mosquitto broker with TLS using openssl. This is part of my code:</p>
  
  <pre><code>MQTTClient client;
  MQTTClient_connectOptions conn_opts = MQTTClient_connectOptions_initializer;
  MQTTClient_message pubmsg = MQTTClient_message_initializer;
  MQTTClient_SSLOptions sslOptions = MQTTClient_SSLOptions_initializer;
  MQTTClient_deliveryToken token;
  
  int rc;
  
  MQTTClient_create(&amp;client, ADDRESS, CLIENTID,
      MQTTCLIENT_PERSISTENCE_NONE, NULL);
  
  conn_opts.keepAliveInterval = 20;
  conn_opts.cleansession = 1;
  
  /* TLS */
  sslOptions.enableServerCertAuth = 0;
  sslOptions.trustStore = "ca_rsp.crt";
  conn_opts.ssl = &amp;sslOptions;
  
  
  if ((rc = MQTTClient_connect(client, &amp;conn_opts)) != MQTTCLIENT_SUCCESS)
  {
      printf("Failed to connect, return code %d\n", rc);
      exit(EXIT_FAILURE);
  }
  </code></pre>
  
  <p>Actually every time I reconnect to the broker, the client make a full handshake. I would like to use the TLS session resumption to reduce the overhead. I've search around the web but I haven't found any example of how o implement that in a simple way.</p>
  
  <p>Any suggestion?</p>
  
  <p>Thanks</p>