       // 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)


// MARK: BayuexChannel Messages
enum BayeuxChannel : String {
  case Handshake = "/meta/handshake";
  case Connect = "/meta/connect";
  case Disconnect = "/meta/disconnect";
  case Subscribe = "/meta/subscribe";
  case Unsubscibe = "/meta/unsubscribe";
}


