         rejoin(chan)
       }
     }
-    
+
     public func leave(topic  topic: String, message: Phoenix.Message) {
       let payload = Phoenix.Payload(topic: topic, event: "phx_leave", message: message)
       send(payload)

      }
      bindings = newBindings
    }
    
    func trigger(triggerEvent: String, msg: Phoenix.Message) {
      for binding in bindings {
        if binding.event == triggerEvent {

import Starscream

public struct Phoenix {

  // MARK: Phoenix Message
  public class Message: Serializable {
    var subject: String?
    var body: AnyObject?
    public var message: AnyObject?

    public init(subject: String, body: AnyObject) {
      (self.subject, self.body) = (subject, body)
      super.init()
      create()
    }

    public init(message: AnyObject) {
      self.message = message
      super.init()
      create(false)
    }

    func create(single: Bool = true) -> [String: AnyObject] {
      if single {
        return [self.subject!: self.body!]
