Compare commits

...
21 Commits
Author SHA1 Message Date
Erik 0bb7fdd2eb bump version 2016-12-18 20:19:09 -05:00
Erik 650538ad2e Merge branch 'development'
* development:
  bump ws, fix #598
  remove namespace from socket id
2016-12-18 20:17:51 -05:00
Erik b1debdf912 bump ws, fix #598 2016-12-18 20:06:12 -05:00
Erik 077de02345 remove namespace from socket id 2016-11-24 08:15:17 -05:00
Erik 163a770abc bump version 2016-11-11 15:55:48 -05:00
Erik fc2a8e348c Merge branch 'development'
* development:
  Fix #562
2016-11-11 15:53:58 -05:00
Erik 56278795ea Merge branch 'development' of https://github.com/socketio/socket.io-client-swift into development
* 'development' of https://github.com/socketio/socket.io-client-swift:
  SocketAckEmitter.isExpected => .expected
  change isRequired() to isExpected()
  remove semicolon
  Update README.md
  add SocketAckEmitter.isRequired()
  Update README.md
  bump version
  bump websocket version
  fix Use Legacy Swift issue
  bump websocket version
  Update README.md
2016-11-11 15:52:48 -05:00
Erik a82f27ab8c Fix #562 2016-11-11 15:52:36 -05:00
Erik Little 2b8476ceca bump version 2016-10-28 11:53:02 -04:00
Erik Little 5ed4723535 Merge branch 'development'
* development:
  SocketAckEmitter.isExpected => .expected
  change isRequired() to isExpected()
  remove semicolon
  add SocketAckEmitter.isRequired()
  fix Use Legacy Swift issue
2016-10-28 11:51:58 -04:00
Erik Little b6aaa42337 Merge branch 'master' into development
* master:
  Update README.md
2016-10-28 11:51:46 -04:00
Erik Little e723604816 Merge pull request #544 from alexsun/patch-1
fix Use Legacy Swift issue
2016-10-28 11:46:46 -04:00
Erik Little 51ee9654da Merge pull request #557 from naderio/master
add SocketAckEmitter.expected to indicate if an ack is expected by server
2016-10-28 11:17:30 -04:00
Nader Toukabri ea3fca3767 SocketAckEmitter.isExpected => .expected 2016-10-28 15:59:50 +01:00
Nader Toukabri efad448fab change isRequired() to isExpected() 2016-10-28 15:14:07 +01:00
Nader Toukabri 018c993a9d remove semicolon 2016-10-28 15:09:21 +01:00
Erik Little 863480acf2 Update README.md 2016-10-28 09:43:46 -04:00
Nader Toukabri ff12285e94 add SocketAckEmitter.isRequired() 2016-10-28 14:23:22 +01:00
Nader Toukabri 51b95f9cee Merge pull request #1 from socketio/master
sync
2016-10-28 12:56:33 +01:00
Erik Little 86181525df Update README.md 2016-10-27 07:14:53 -04:00
Jin Sun 0143dc25bf fix Use Legacy Swift issue 2016-10-18 17:29:01 +08:00
6 changed files with 20 additions and 9 deletions

No files matched your search

+4 -4
View File
@@ -39,7 +39,7 @@ SocketIOClient* socket = [[SocketIOClient alloc] initWithSocketURL:url config:@{
[socket on:@"currentAmount" callback:^(NSArray* data, SocketAckEmitter* ack) {
double cur = [[data objectAtIndex:0] floatValue];
[[socket emitWithAck:@"testAckEmit" with:@[@YES]] timingOutAfter:0 callback:^(NSArray* data) {
[[socket emitWithAck:@"canUpdate" with:@[@(cur)]] timingOutAfter:0 callback:^(NSArray* data) {
[socket emit:@"update" withItems:@[@{@"amount": @(cur + 2.50)}]];
}];
@@ -95,7 +95,7 @@ Carthage
-----------------
Add this line to your `Cartfile`:
```
github "socketio/socket.io-client-swift" ~> 8.1.0 # Or latest version
github "socketio/socket.io-client-swift" ~> 8.2.0 # Or latest version
```
Run `carthage update --platform ios,macosx`.
@@ -108,7 +108,7 @@ Create `Podfile` and add `pod 'Socket.IO-Client-Swift'`:
use_frameworks!
target 'YourApp' do
pod 'Socket.IO-Client-Swift', '~> 8.1.0' # Or latest version
pod 'Socket.IO-Client-Swift', '~> 8.2.0' # Or latest version
end
```
@@ -137,7 +137,7 @@ CocoaSeeds
Add this line to your `Seedfile`:
```
github "socketio/socket.io-client-swift", "v8.1.0", :files => "Source/*.swift" # Or latest version
github "socketio/socket.io-client-swift", "v8.2.0", :files => "Source/*.swift" # Or latest version
```
Run `seed install`.
+3 -2
View File
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "Socket.IO-Client-Swift"
s.module_name = "SocketIO"
s.version = "8.1.0"
s.version = "8.2.0"
s.summary = "Socket.IO-client for iOS and OS X"
s.description = <<-DESC
Socket.IO-client for iOS and OS X.
@@ -14,8 +14,9 @@ Pod::Spec.new do |s|
s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.10'
s.tvos.deployment_target = '9.0'
s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v8.1.0' }
s.source = { :git => "https://github.com/socketio/socket.io-client-swift.git", :tag => 'v8.2.0' }
s.source_files = "Source/**/*.swift"
s.requires_arc = true
s.pod_target_xcconfig = {'SWIFT_VERSION' => '3.0'}
# s.dependency 'Starscream', '~> 0.9' # currently this repo includes Starscream swift files
end
+1 -1
View File
@@ -26,7 +26,7 @@ public protocol SSLTrustValidator {
func isValid(_ trust: SecTrust, domain: String?) -> Bool
}
open class SSLCert {
open class SSLCert : NSObject {
var certData: Data?
var key: SecKey?
+5
View File
@@ -27,6 +27,10 @@ import Foundation
public final class SocketAckEmitter : NSObject {
let socket: SocketIOClient
let ackNum: Int
public var expected: Bool {
return ackNum != -1
}
init(socket: SocketIOClient, ackNum: Int) {
self.socket = socket
@@ -44,6 +48,7 @@ public final class SocketAckEmitter : NSObject {
socket.emitAck(ackNum, with: items)
}
}
public final class OnAckCallback : NSObject {
+2 -2
View File
@@ -65,7 +65,7 @@ public final class SocketIOClient : NSObject, SocketEngineClient, SocketParsable
var waitingPackets = [SocketPacket]()
public var sid: String? {
return nsp + "#" + (engine?.sid ?? "")
return engine?.sid
}
/// Type safe way to create a new SocketIOClient. opts can be omitted
@@ -253,7 +253,7 @@ public final class SocketIOClient : NSObject, SocketEngineClient, SocketParsable
}
public func engineDidClose(reason: String) {
parseQueue.sync {
parseQueue.async {
self.waitingPackets.removeAll()
}
+5
View File
@@ -162,6 +162,11 @@ open class WebSocket : NSObject, StreamDelegate {
public init(url: URL, protocols: [String]? = nil) {
self.url = url
self.origin = url.absoluteString
if let hostUrl = URL (string: "/", relativeTo: url) {
var origin = hostUrl.absoluteString
origin.remove(at: origin.index(before: origin.endIndex))
self.origin = origin
}
writeQueue.maxConcurrentOperationCount = 1
optionalProtocols = protocols
}