comments and style
This commit is contained in:
parent
5060f90a79
commit
e38c4081ec
@ -152,7 +152,7 @@ public final class SocketEngine: NSObject, SocketEnginePollable, SocketEngineWeb
|
|||||||
switch code {
|
switch code {
|
||||||
case 0: // Unknown transport
|
case 0: // Unknown transport
|
||||||
didError(error)
|
didError(error)
|
||||||
case 1: // Unknown sid. clear and retry connect
|
case 1: // Unknown sid.
|
||||||
didError(error)
|
didError(error)
|
||||||
case 2: // Bad handshake request
|
case 2: // Bad handshake request
|
||||||
didError(error)
|
didError(error)
|
||||||
|
|||||||
@ -112,7 +112,7 @@ extension SocketEnginePollable {
|
|||||||
|
|
||||||
func doLongPoll(req: NSURLRequest) {
|
func doLongPoll(req: NSURLRequest) {
|
||||||
doRequest(req) {[weak self] data, res, err in
|
doRequest(req) {[weak self] data, res, err in
|
||||||
guard let this = self else {return}
|
guard let this = self else { return }
|
||||||
|
|
||||||
if err != nil || data == nil {
|
if err != nil || data == nil {
|
||||||
DefaultSocketLogger.Logger.error(err?.localizedDescription ?? "Error", type: "SocketEnginePolling")
|
DefaultSocketLogger.Logger.error(err?.localizedDescription ?? "Error", type: "SocketEnginePolling")
|
||||||
|
|||||||
@ -96,7 +96,7 @@ public final class SocketIOClient: NSObject, SocketEngineClient, SocketParsable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Not so type safe way to create a SocketIOClient, meant for Objective-C compatiblity.
|
Not so type safe way to create a SocketIOClient, meant for Objective-C compatiblity.
|
||||||
If using Swift it's recommended to use `init(var socketURL: NSURL, options: Set<SocketIOClientOption>)`
|
If using Swift it's recommended to use `init(socketURL: NSURL, options: Set<SocketIOClientOption>)`
|
||||||
*/
|
*/
|
||||||
public convenience init(socketURL: NSURL, options: NSDictionary?) {
|
public convenience init(socketURL: NSURL, options: NSDictionary?) {
|
||||||
self.init(socketURL: socketURL, options: options?.toSocketOptionsSet() ?? [])
|
self.init(socketURL: socketURL, options: options?.toSocketOptionsSet() ?? [])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user