This commit is contained in:
Erik 2016-03-25 09:48:04 -04:00
parent 8f8d5acdba
commit d4c01183ab
14 changed files with 17 additions and 17 deletions

View File

@ -24,7 +24,7 @@
import Foundation
public final class SocketAckEmitter: NSObject {
public final class SocketAckEmitter : NSObject {
let socket: SocketIOClient
let ackNum: Int

View File

@ -24,7 +24,7 @@
import Foundation
private struct SocketAck: Hashable, Equatable {
private struct SocketAck : Hashable, Equatable {
let ack: Int
var callback: AckCallback!
var hashValue: Int {

View File

@ -24,7 +24,7 @@
import Foundation
public final class SocketAnyEvent: NSObject {
public final class SocketAnyEvent : NSObject {
public let event: String
public let items: NSArray?
override public var description: String {

View File

@ -22,7 +22,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
protocol SocketClientSpec: class {
protocol SocketClientSpec : class {
var nsp: String { get set }
var waitingPackets: [SocketPacket] { get set }

View File

@ -24,7 +24,7 @@
import Foundation
public final class SocketEngine: NSObject, SocketEnginePollable, SocketEngineWebsocket {
public final class SocketEngine : NSObject, SocketEnginePollable, SocketEngineWebsocket {
public let emitQueue = dispatch_queue_create("com.socketio.engineEmitQueue", DISPATCH_QUEUE_SERIAL)
public let handleQueue = dispatch_queue_create("com.socketio.engineHandleQueue", DISPATCH_QUEUE_SERIAL)
public let parseQueue = dispatch_queue_create("com.socketio.engineParseQueue", DISPATCH_QUEUE_SERIAL)

View File

@ -25,6 +25,6 @@
import Foundation
@objc public enum SocketEnginePacketType: Int {
@objc public enum SocketEnginePacketType : Int {
case Open, Close, Ping, Pong, Message, Upgrade, Noop
}

View File

@ -25,7 +25,7 @@
import Foundation
/// Protocol that is used to implement socket.io polling support
public protocol SocketEnginePollable: SocketEngineSpec {
public protocol SocketEnginePollable : SocketEngineSpec {
var invalidated: Bool { get }
/// Holds strings waiting to be sent over polling.
/// You shouldn't need to mess with this.

View File

@ -26,7 +26,7 @@
import Foundation
/// Protocol that is used to implement socket.io WebSocket support
public protocol SocketEngineWebsocket: SocketEngineSpec, WebSocketDelegate {
public protocol SocketEngineWebsocket : SocketEngineSpec, WebSocketDelegate {
var ws: WebSocket? { get }
func sendWebSocketMessage(str: String, withType type: SocketEnginePacketType, withData datas: [NSData])

View File

@ -24,7 +24,7 @@
import Foundation
public final class SocketIOClient: NSObject, SocketEngineClient, SocketParsable {
public final class SocketIOClient : NSObject, SocketEngineClient, SocketParsable {
public let socketURL: NSURL
public private(set) var engine: SocketEngineSpec?

View File

@ -24,11 +24,11 @@
import Foundation
protocol ClientOption: CustomStringConvertible, Hashable {
protocol ClientOption : CustomStringConvertible, Hashable {
func getSocketIOOptionValue() -> AnyObject
}
public enum SocketIOClientOption: ClientOption {
public enum SocketIOClientOption : ClientOption {
case ConnectParams([String: AnyObject])
case Cookies([NSHTTPCookie])
case DoubleEncodeUTF8(Bool)
@ -152,7 +152,7 @@ public func ==(lhs: SocketIOClientOption, rhs: SocketIOClientOption) -> Bool {
return lhs.description == rhs.description
}
extension Set where Element: ClientOption {
extension Set where Element : ClientOption {
mutating func insertIgnore(element: Element) {
if !contains(element) {
insert(element)

View File

@ -24,7 +24,7 @@
import Foundation
@objc public enum SocketIOClientStatus: Int, CustomStringConvertible {
@objc public enum SocketIOClientStatus : Int, CustomStringConvertible {
case NotConnected, Closed, Connecting, Connected
public var description: String {

View File

@ -24,7 +24,7 @@
import Foundation
public protocol SocketLogger: class {
public protocol SocketLogger : class {
/// Whether to log or not
var log: Bool {get set}
@ -54,7 +54,7 @@ public extension SocketLogger {
}
}
class DefaultSocketLogger: SocketLogger {
class DefaultSocketLogger : SocketLogger {
static var Logger: SocketLogger = DefaultSocketLogger()
var log = false

View File

@ -22,7 +22,7 @@
import Foundation
protocol SocketParsable: SocketClientSpec {
protocol SocketParsable : SocketClientSpec {
func parseBinaryData(data: NSData)
func parseSocketMessage(message: String)
}

View File

@ -18,7 +18,7 @@ infix operator <~ { associativity none precedence 130 }
private let lock = dispatch_semaphore_create(1)
private var swiftRegexCache = [String: NSRegularExpression]()
internal final class SwiftRegex: NSObject, BooleanType {
internal final class SwiftRegex : NSObject, BooleanType {
var target: String
var regex: NSRegularExpression