         return (urlPolling, urlWebSocket)
     }
 
-    private func createWebsocket(andConnect connect: Bool) {
+    private func createWebsocketAndConnect(connect: Bool) {
         let wsUrl = urlWebSocket + (sid == "" ? "" : "&sid=\(sid)")
         
         ws = WebSocket(url: NSURL(string: wsUrl)!,

        if forceWebsockets {
            polling = false
            websocket = true
            createWebsocket(andConnect: true)
            return
        }


                }
                
                if !forcePolling && !forceWebsockets && upgradeWs {
                    createWebsocketAndConnect(true)
                }
            }
        } catch {
