Merge branch 'development'
* development: fix insert invoked twice add , to disconnect update changelog Fix #923 update reconnect documentation update starscream Fix #894
This commit is contained in:
commit
ea93e69d5c
@ -1,3 +1,8 @@
|
|||||||
|
# 13.1.1
|
||||||
|
|
||||||
|
- Fix [#923](https://github.com/socketio/socket.io-client-swift/issues/923)
|
||||||
|
- Fix [#894](https://github.com/socketio/socket.io-client-swift/issues/894)
|
||||||
|
|
||||||
# v13.1.0
|
# v13.1.0
|
||||||
|
|
||||||
- Allow setting `SocketEngineSpec.extraHeaders` after init.
|
- Allow setting `SocketEngineSpec.extraHeaders` after init.
|
||||||
|
|||||||
@ -24,8 +24,8 @@
|
|||||||
"repositoryURL": "https://github.com/daltoniam/Starscream",
|
"repositoryURL": "https://github.com/daltoniam/Starscream",
|
||||||
"state": {
|
"state": {
|
||||||
"branch": null,
|
"branch": null,
|
||||||
"revision": "44ce58956fae7db22fb0106cb4ce3dbef3d06d00",
|
"revision": "6cb1c474e09b0a3aa60bcdc7553b570336d6a61a",
|
||||||
"version": "3.0.2"
|
"version": "3.0.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
Pod::Spec.new do |s|
|
Pod::Spec.new do |s|
|
||||||
s.name = "Socket.IO-Client-Swift"
|
s.name = "Socket.IO-Client-Swift"
|
||||||
s.module_name = "SocketIO"
|
s.module_name = "SocketIO"
|
||||||
s.version = "13.1.0"
|
s.version = "13.1.1"
|
||||||
s.summary = "Socket.IO-client for iOS and OS X"
|
s.summary = "Socket.IO-client for iOS and OS X"
|
||||||
s.description = <<-DESC
|
s.description = <<-DESC
|
||||||
Socket.IO-client for iOS and OS X.
|
Socket.IO-client for iOS and OS X.
|
||||||
@ -18,7 +18,7 @@ Pod::Spec.new do |s|
|
|||||||
s.requires_arc = true
|
s.requires_arc = true
|
||||||
s.source = {
|
s.source = {
|
||||||
:git => "https://github.com/socketio/socket.io-client-swift.git",
|
:git => "https://github.com/socketio/socket.io-client-swift.git",
|
||||||
:tag => 'v13.1.0',
|
:tag => 'v13.1.1',
|
||||||
:submodules => true
|
:submodules => true
|
||||||
}
|
}
|
||||||
s.pod_target_xcconfig = {
|
s.pod_target_xcconfig = {
|
||||||
|
|||||||
@ -139,8 +139,6 @@ open class SocketManager : NSObject, SocketManagerSpec, SocketParsable, SocketDa
|
|||||||
self._config.insert(.secure(true))
|
self._config.insert(.secure(true))
|
||||||
}
|
}
|
||||||
|
|
||||||
self._config.insert(.path("/socket.io/"), replacing: false)
|
|
||||||
|
|
||||||
super.init()
|
super.init()
|
||||||
|
|
||||||
setConfigs(_config)
|
setConfigs(_config)
|
||||||
@ -205,7 +203,7 @@ open class SocketManager : NSObject, SocketManagerSpec, SocketParsable, SocketDa
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
engine?.send("0\(socket.nsp)", withData: [])
|
engine?.send("0\(socket.nsp),", withData: [])
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Called when the manager has disconnected from socket.io.
|
/// Called when the manager has disconnected from socket.io.
|
||||||
@ -233,7 +231,8 @@ open class SocketManager : NSObject, SocketManagerSpec, SocketParsable, SocketDa
|
|||||||
///
|
///
|
||||||
/// - parameter socket: The socket to disconnect.
|
/// - parameter socket: The socket to disconnect.
|
||||||
open func disconnectSocket(_ socket: SocketIOClient) {
|
open func disconnectSocket(_ socket: SocketIOClient) {
|
||||||
engine?.send("1\(socket.nsp)", withData: [])
|
engine?.send("1\(socket.nsp),", withData: [])
|
||||||
|
|
||||||
socket.didDisconnect(reason: "Namespace leave")
|
socket.didDisconnect(reason: "Namespace leave")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -414,7 +413,8 @@ open class SocketManager : NSObject, SocketManagerSpec, SocketParsable, SocketDa
|
|||||||
|
|
||||||
/// Tries to reconnect to the server.
|
/// Tries to reconnect to the server.
|
||||||
///
|
///
|
||||||
/// This will cause a `disconnect` event to be emitted, as well as an `reconnectAttempt` event.
|
/// This will cause a `SocketClientEvent.reconnect` event to be emitted, as well as
|
||||||
|
/// `SocketClientEvent.reconnectAttempt` events.
|
||||||
open func reconnect() {
|
open func reconnect() {
|
||||||
guard !reconnecting else { return }
|
guard !reconnecting else { return }
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@ extension Array {
|
|||||||
|
|
||||||
extension CharacterSet {
|
extension CharacterSet {
|
||||||
static var allowedURLCharacterSet: CharacterSet {
|
static var allowedURLCharacterSet: CharacterSet {
|
||||||
return CharacterSet(charactersIn: "!*'();:@&=+$,/?%#[]\" {}").inverted
|
return CharacterSet(charactersIn: "!*'();:@&=+$,/?%#[]\" {}^").inverted
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -87,11 +87,11 @@ class SocketEngineTest: XCTestCase {
|
|||||||
XCTAssertEqual(engine.urlWebSocket.query, "transport=websocket&created=2016-05-04T18%3A31%3A15%2B0200")
|
XCTAssertEqual(engine.urlWebSocket.query, "transport=websocket&created=2016-05-04T18%3A31%3A15%2B0200")
|
||||||
|
|
||||||
engine.connectParams = [
|
engine.connectParams = [
|
||||||
"forbidden": "!*'();:@&=+$,/?%#[]\" {}"
|
"forbidden": "!*'();:@&=+$,/?%#[]\" {}^"
|
||||||
]
|
]
|
||||||
|
|
||||||
XCTAssertEqual(engine.urlPolling.query, "transport=polling&b64=1&forbidden=%21%2A%27%28%29%3B%3A%40%26%3D%2B%24%2C%2F%3F%25%23%5B%5D%22%20%7B%7D")
|
XCTAssertEqual(engine.urlPolling.query, "transport=polling&b64=1&forbidden=%21%2A%27%28%29%3B%3A%40%26%3D%2B%24%2C%2F%3F%25%23%5B%5D%22%20%7B%7D%5E")
|
||||||
XCTAssertEqual(engine.urlWebSocket.query, "transport=websocket&forbidden=%21%2A%27%28%29%3B%3A%40%26%3D%2B%24%2C%2F%3F%25%23%5B%5D%22%20%7B%7D")
|
XCTAssertEqual(engine.urlWebSocket.query, "transport=websocket&forbidden=%21%2A%27%28%29%3B%3A%40%26%3D%2B%24%2C%2F%3F%25%23%5B%5D%22%20%7B%7D%5E")
|
||||||
}
|
}
|
||||||
|
|
||||||
func testBase64Data() {
|
func testBase64Data() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user