     }
     
     /**
-    Joins nsp if it is not /
-    */
+     Joins nsp if it is not /
+     */
     public func joinNamespace() {
         Logger.log("Joining namespace", type: logType)
         

            
            Logger.log("Handling event: %@ with data: %@", type: logType, args: event, data ?? "")
            
            if anyHandler != nil {
                dispatch_async(handleQueue) {
                    self.anyHandler?(SocketAnyEvent(event: event, items: data))
                }
            }
            
            for handler in handlers where handler.event == event {
                if let ack = ack {
                    dispatch_async(handleQueue) {
                        handler.executeCallback(data, withAck: ack, withSocket: self)
                    }
                } else {
                    dispatch_async(handleQueue) {
                        handler.executeCallback(data, withAck: ack, withSocket: self)
                    }
                }
            }
    }
    
    /**
    Leaves nsp and goes back to /
    */
    public func leaveNamespace() {
        if nsp != "/" {
            engine?.send("1\(nsp)", withData: nil)

    
    private func addEngine() -> SocketEngine {
        Logger.log("Adding engine", type: logType)
        
        let newEngine = SocketEngine(client: self, url: socketURL, options: options ?? [])
        
        engine = newEngine
        return newEngine
    }
