title: How to connect to Socket.IO swift?
body: <p>I am having trouble connecting to Socket.IO chat..</p>
  
  <pre><code>import UIKit
  import SocketIO
  
  class ViewController: UIViewController {
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          let manager = SocketManager(socketURL: URL(string: "wss://socket-io-chat.now.sh/socket.io/")!, config: [.log(true), .compress])
          let socket = manager.defaultSocket
  
          socket.on(clientEvent: .connect) {data, ack in
              print("socket connected")
          }
  
          socket.on("new message") {data, ack in
              print("new Messages")
          }
  
          socket.connect()  
      }
  }
  </code></pre>
  
  <p>I am using the latest socket.io library and already added app transport in info.plist.</p>
  
  <p>here's what the logs says..</p>
  
  <blockquote>
    <p>2018-01-22 16:56:46.316676+0800 ExampleSocket[6963:2231315] LOG SocketEngine: Got message: 40
    2018-01-22 16:56:46.317249+0800 ExampleSocket[6963:2231315] LOG SocketEngine: Writing poll:  has data: false
    2018-01-22 16:56:46.317771+0800 ExampleSocket[6963:2231315] LOG SocketEnginePolling: Sending poll:  as type: 2
    2018-01-22 16:56:46.323959+0800 ExampleSocket[6963:2231318] TIC Read Status [2:0x0]: 1:57
    2018-01-22 16:56:46.324082+0800 ExampleSocket[6963:2231318] TIC Read Status [2:0x0]: 1:57
    2018-01-22 16:56:46.330099+0800 ExampleSocket[6963:2231315] LOG SocketEnginePolling: Created POST string: 1:2
    2018-01-22 16:56:46.330615+0800 ExampleSocket[6963:2231315] LOG SocketEnginePolling: POSTing
    2018-01-22 16:56:46.330744+0800 ExampleSocket[6963:2231315] LOG SocketEngine: Engine is being released</p>
  </blockquote>