title: How to set an android app to use socket.io in ssl?
body: <p>I am using a library for <a href="https://github.com/socketio/socket.io-client-java" rel="nofollow">socket.io</a> to make an app for android. I have managed to get the app to communicate with a nginx + node.js machine. I am now interested in using SSL for the length of the connection, but cannot seem to get it to work. I think I can figure out the nginx end, but I am having some issue with the android part. I notice that the website contained the following: </p>
  
  <pre><code>// default SSLContext for all sockets
  IO.setDefaultSSLContext(mySSLContext);
  IO.setDefaultHostnameVerifier(myHostnameVerifier);
  
  // set as an option
  opts = new IO.Options();
  opts.sslContext = mySSLContext;
  opts.hostnameVerifier = myHostnameVerifier;
  socket = IO.socket("https://localhost", opts);
  </code></pre>
  
  <p>I only changed the http to an https, I am assuming I need to do more here, but I have no idea what the rest of this bit of code means, what are the objects <code>mySSLContext</code> and <code>myHostnameVerifier</code> and how would I generate them?</p>