 
             ws?.writeString("\(type.rawValue)\(str)")
 
-            if datas != nil {
-                for data in datas! {
+            if let datas = datas {
+                for data in datas {
                     let (data, _) = createBinaryDataForSend(data)
                     if data != nil {
                         ws?.writeData(data!)

    }

    private func handleClose() {
        if polling {
            client?.engineDidClose("Disconnect")
        }
    }



        let req = NSMutableURLRequest(URL: NSURL(string: urlPolling! + "&sid=\(sid)")!)

        if let cookies = cookies {
            let headers = NSHTTPCookie.requestHeaderFieldsWithCookies(cookies)
            req.allHTTPHeaderFields = headers
        }

