Compare commits

...
2 Commits
Author SHA1 Message Date
Erik f933b7addc bump version 2015-09-25 12:45:00 -04:00
Erik 3754cd2c2d fix namespaces 2015-09-25 12:42:22 -04:00
3 changed files with 10 additions and 10 deletions

No files matched your search

+2 -2
View File
@@ -64,7 +64,7 @@ Carthage
-----------------
Add this line to your `Cartfile`:
```
github "socketio/socket.io-client-swift" ~> 3.1.1 # Or latest version
github "socketio/socket.io-client-swift" ~> 3.1.2 # Or latest version
```
Run `carthage update --platform ios,macosx`.
@@ -83,7 +83,7 @@ source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'Socket.IO-Client-Swift', '~> 3.1.1' # Or latest version
pod 'Socket.IO-Client-Swift', '~> 3.1.2' # Or latest version
```
Install pods:
+2 -2
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Socket.IO-Client-Swift"
s.version = "3.1.1"
s.version = "3.1.2"
s.summary = "Socket.IO-client for iOS and OS X"
s.description = <<-DESC
Socket.IO-client for iOS and OS X.
@@ -12,7 +12,7 @@ Pod::Spec.new do |s|
s.author = { "Erik" => "nuclear.ace@gmail.com" }
s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.10'
s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v3.1.1' }
s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v3.1.2' }
s.source_files = "SocketIOClientSwift/**/*.swift"
s.requires_arc = true
# s.dependency 'Starscream', '~> 0.9' # currently this repo includes Starscream swift files
+6 -6
View File
@@ -39,17 +39,15 @@ class SocketParser {
}
private static func handlePacket(pack: SocketPacket, withSocket socket: SocketIOClient) {
guard isCorrectNamespace(pack.nsp, socket) else { return }
switch pack.type {
case .Event:
case .Event where isCorrectNamespace(pack.nsp, socket):
socket.handleEvent(pack.event, data: pack.args ?? [],
isInternalMessage: false, wantsAck: pack.id)
case .Ack:
case .Ack where isCorrectNamespace(pack.nsp, socket):
socket.handleAck(pack.id, data: pack.data)
case .BinaryEvent:
case .BinaryEvent where isCorrectNamespace(pack.nsp, socket):
socket.waitingData.append(pack)
case .BinaryAck:
case .BinaryAck where isCorrectNamespace(pack.nsp, socket):
socket.waitingData.append(pack)
case .Connect:
handleConnect(pack, socket: socket)
@@ -57,6 +55,8 @@ class SocketParser {
socket.didDisconnect("Got Disconnect")
case .Error:
socket.didError("Error: \(pack.data)")
default:
Logger.log("Got invalid packet: %@", type: "SocketParser", args: pack.description)
}
}