This commit is contained in:
Erik 2015-05-17 08:28:10 -04:00
parent 2453f33191
commit a6f68e7b70
4 changed files with 3 additions and 5 deletions

View File

@ -430,7 +430,7 @@ public final class SocketEngine: NSObject, WebSocketDelegate, SocketLogClient {
}
}
for var i = 0, l = str.length; i < l; i = i &+ 1 {
for var i = 0, l = str.length; i < l; i++ {
let chr = String(strArray[i])
if chr != ":" {
@ -443,7 +443,7 @@ public final class SocketEngine: NSObject, WebSocketDelegate, SocketLogClient {
return
}
msg = String(strArray[i&+1...i&+n])
msg = String(strArray[i+1...i+n])
if let lengthInt = length.toInt() {
if lengthInt != msg.length {

View File

@ -27,7 +27,6 @@ import Foundation
@objc public protocol SocketEngineClient {
var handleQueue:dispatch_queue_attr_t! {get}
var emitQueue:dispatch_queue_attr_t! {get}
var socketURL:String {get}
var secure:Bool {get}

View File

@ -25,7 +25,6 @@
import Foundation
private func emitAckCallback(socket:SocketIOClient, num:Int)
// Curried
(items:AnyObject...) -> Void {
socket.emitAck(num, withData: items)
}

View File

@ -145,7 +145,7 @@ class SocketParser {
}
if ++i < arr.count {
let d = String(arr[i...arr.count-1])
let d = str[advance(str.startIndex, i)...advance(str.startIndex, count(str)-1)]
let noPlaceholders = d["(\\{\"_placeholder\":true,\"num\":(\\d*)\\})"] ~= "\"~~$2\""
let data = SocketParser.parseData(noPlaceholders) as? [AnyObject] ?? [noPlaceholders]