       // Handle Meta Channels
       if let metaChannel = BayeuxChannel(rawValue: channel) {
         switch(metaChannel) {
-        case .HANDSHAKE_CHANNEL:
+        case .Handshake:
           self.fayeClientId = messageDict["clientId"].stringValue
           if messageDict["successful"].int == 1 {
             self.delegate?.connectedToServer(self)

  // "subscription": "/foo/**"
  // }
  func subscribe(channel:String) {
    let dict:[String:AnyObject] = ["channel": BayeuxChannel.SUBSCRIBE_CHANNEL.rawValue, "clientId": self.fayeClientId!, "subscription": channel]
    if let string = JSON(dict).rawString() {
      self.transport?.writeString(string)
      self.pendingSubscriptions.addObject(channel)

              self.delegate?.subscriptionFailedWithError(self, error: error)
            }
          }
        case .Unsubscibe:
          if let subscription = messageJSON[0]["subscription"].string {
            self.openSubscriptions.removeObject(subscription)
            self.delegate?.didUnsubscribeFromChannel(self, channel: subscription)
