             }
         }
         
-        if arr[i + 1] == "/" {
+        if messageCharacters[i + 1] == "/" {
             nsp = ""
             
-            while ++i < arr.count {
-                let c = arr[i]
+            while ++i < messageCharacters.count {
+                let c = messageCharacters[i]
                 
                 if c == "," {
                     break

        if type == .BinaryEvent || type == .BinaryAck {
            var buf = ""
            
            while arr[++i] != "-" {
                buf += String(arr[i])
                if i == arr.count {
                    break
                }
            }
            
            if let holders = Int(buf) where arr[i] == "-" {
                placeholders = holders
            } else {
                NSLog("Error parsing \(str)")

import Foundation

class SocketParser {
    
    private static func isCorrectNamespace(nsp: String, _ socket: SocketIOClient) -> Bool {
        return nsp == socket.nsp
    }
