remove mutable parameter

This commit is contained in:
Erik 2015-12-07 15:09:07 -05:00
parent 2ccaa4351a
commit 275c873880
2 changed files with 3 additions and 5 deletions

View File

@ -59,17 +59,14 @@ public final class SocketIOClient: NSObject, SocketEngineClient {
/**
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
if socketURL["https://"].matches().count != 0 {
self.options.insertIgnore(.Secure(true))
}
socketURL = socketURL["http://"] ~= ""
socketURL = socketURL["https://"] ~= ""
self.socketURL = socketURL
self.socketURL = socketURL["https?://"] ~= ""
for option in options ?? [] {
switch option {

View File

@ -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> {
var parser = SocketStringReader(message: message)