         unwrappedJsonString(json["event"].asString)
       )
       let msg: [String: AnyObject] = json["payload"].asDictionary!
-      
+
       let messagePayload = Phoenix.Payload(topic: topic, event: event, message: Phoenix.Message(message: msg))
       onMessage(messagePayload)
     }
-    
+
     public func websocketDidReceiveData(socket: WebSocket, data: NSData) {
       print("got some data: \(data.length)")
     }
-    
+
     public func websocketDidDisconnect(socket: WebSocket, error: NSError?) {
       if let err = error { onError(err) }
       print("socket closed: \(error?.localizedDescription)")
       onClose("reason: \(error?.localizedDescription)")
     }
-    
+
     public func websocketDidConnect(socket: WebSocket) {
       print("socket opened")
       onOpen()
     }
-    
+
     public func websocketDidWriteError(error: NSError?) {
       onError(error!)
     }
-    
+
     func unwrappedJsonString(string: String?) -> String {
       if let stringVal = string {
         return stringVal

      }
      bindings = newBindings
    }
    
    /**
     Triggers an event on this channel
     
     - parameter triggerEvent: String event name
     - parameter msg:          Phoenix.Message to pass into event callback
     */

      heartbeatTimer.invalidate()
      reconnectTimer.invalidate()
      sendBufferTimer.invalidate()

      heartbeatTimer = NSTimer()
      reconnectTimer = NSTimer()
      sendBufferTimer = NSTimer()
    }

    /**
     Initializes a 30s timer to let Phoenix know this device is still alive
     */
