Compare commits

...
5 Commits
Author SHA1 Message Date
Erik 6cb372e3b9 bump version 2015-04-28 09:53:34 -04:00
Erik 10ffe54b08 fix socketio/socket.io-client-swift#69 2015-04-28 09:50:12 -04:00
Erik 08d100b9ca fix socketio/socket.io-client-swift#65 2015-04-28 09:45:44 -04:00
Erik 1b05418674 clarify events 2015-04-27 17:22:17 -04:00
Erik 75a4adfbbd document reconnect 2015-04-27 12:59:34 -04:00
4 changed files with 8 additions and 5 deletions

No files matched your search

+2 -1
View File
@@ -110,8 +110,9 @@ Methods
7. `connect()` - Establishes a connection to the server. A "connect" event is fired upon successful connection.
8. `connectWithParams(params:[String: AnyObject])` - Establishes a connection to the server passing the specified params. A "connect" event is fired upon successful connection.
9. `close(#fast:Bool)` - Closes the socket. Once a socket is closed it should not be reopened. Pass true to fast if you're closing from a background task.
10. `reconnect()` - Causes the client to reconnect to the server.
Events
Client Events
------
1. `connect` - Emitted when on a successful connection.
2. `disconnect` - Emitted when the connection is closed.
+2 -2
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Socket.IO-Client-Swift"
s.version = "2.2.0"
s.version = "2.2.1"
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 => 'v2.2.0' }
s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v2.2.1' }
s.source_files = "SocketIOClientSwift/**/*.swift"
s.requires_arc = true
# s.dependency 'Starscream', '~> 0.9' # currently this repo includes Starscream swift files
+3 -1
View File
@@ -151,7 +151,9 @@ public final class SocketEngine: NSObject, WebSocketDelegate, SocketLogClient {
return ("", "")
}
var url = "\(self.client!.socketURL)\(self.socketPath)/socket.io/?transport="
let path = self.socketPath == "" ? "/socket.io" : self.socketPath
var url = "\(self.client!.socketURL)\(path)/?transport="
var urlPolling:String
var urlWebSocket:String
+1 -1
View File
@@ -161,7 +161,7 @@ class SocketParser {
var err:NSError?
let stringData = data.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false)
let parsed:AnyObject? = NSJSONSerialization.JSONObjectWithData(stringData!,
options: NSJSONReadingOptions.AllowFragments, error: &err)
options: NSJSONReadingOptions.MutableContainers, error: &err)
if err != nil {
// println(err)