remove mutable parameter
This commit is contained in:
parent
2ccaa4351a
commit
275c873880
@ -59,17 +59,14 @@ public final class SocketIOClient: NSObject, SocketEngineClient {
|
|||||||
/**
|
/**
|
||||||
Type safe way to create a new SocketIOClient. opts can be omitted
|
Type safe way to create a new SocketIOClient. opts can be omitted
|
||||||
*/
|
*/
|
||||||
public init(var socketURL: String, options: Set<SocketIOClientOption> = []) {
|
public init(socketURL: String, options: Set<SocketIOClientOption> = []) {
|
||||||
self.options = options
|
self.options = options
|
||||||
|
|
||||||
if socketURL["https://"].matches().count != 0 {
|
if socketURL["https://"].matches().count != 0 {
|
||||||
self.options.insertIgnore(.Secure(true))
|
self.options.insertIgnore(.Secure(true))
|
||||||
}
|
}
|
||||||
|
|
||||||
socketURL = socketURL["http://"] ~= ""
|
self.socketURL = socketURL["https?://"] ~= ""
|
||||||
socketURL = socketURL["https://"] ~= ""
|
|
||||||
|
|
||||||
self.socketURL = socketURL
|
|
||||||
|
|
||||||
for option in options ?? [] {
|
for option in options ?? [] {
|
||||||
switch option {
|
switch option {
|
||||||
|
|||||||
@ -60,6 +60,7 @@ class SocketParser {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Parses a messsage from the engine. Returning either a string error or a complete SocketPacket
|
||||||
static func parseString(message: String) -> Either<String, SocketPacket> {
|
static func parseString(message: String) -> Either<String, SocketPacket> {
|
||||||
var parser = SocketStringReader(message: message)
|
var parser = SocketStringReader(message: message)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user