Skip to content

Commit 28ae7a8

Browse files
committed
change access levels
1 parent e07ed93 commit 28ae7a8

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

SocketIOClientSwift/SocketEngine.swift

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ public final class SocketEngine: NSObject, SocketEngineSpec, WebSocketDelegate {
131131

132132
return .Left(mutData)
133133
} else {
134-
let str = "b4" + data.base64EncodedStringWithOptions(
135-
NSDataBase64EncodingOptions.Encoding64CharacterLineLength)
134+
let str = "b4" + data.base64EncodedStringWithOptions(.Encoding64CharacterLineLength)
136135

137136
return .Right(str)
138137
}
@@ -456,7 +455,7 @@ public final class SocketEngine: NSObject, SocketEngineSpec, WebSocketDelegate {
456455

457456
// Polling methods
458457
extension SocketEngine {
459-
func doPoll() {
458+
private func doPoll() {
460459
if websocket || waitingForPoll || !connected || closed {
461460
return
462461
}
@@ -478,7 +477,7 @@ extension SocketEngine {
478477
doLongPoll(req)
479478
}
480479

481-
func doRequest(req: NSMutableURLRequest,
480+
private func doRequest(req: NSMutableURLRequest,
482481
withCallback callback: (NSData?, NSURLResponse?, NSError?) -> Void) {
483482
if !polling || closed || invalidated {
484483
return
@@ -490,7 +489,7 @@ extension SocketEngine {
490489
session.dataTaskWithRequest(req, completionHandler: callback).resume()
491490
}
492491

493-
func doLongPoll(req: NSMutableURLRequest) {
492+
private func doLongPoll(req: NSMutableURLRequest) {
494493
doRequest(req) {[weak self] data, res, err in
495494
if let this = self {
496495
if err != nil || data == nil {
@@ -521,7 +520,7 @@ extension SocketEngine {
521520
}
522521
}
523522

524-
func flushWaitingForPost() {
523+
private func flushWaitingForPost() {
525524
if postWait.count == 0 || !connected {
526525
return
527526
} else if websocket {
@@ -583,7 +582,7 @@ extension SocketEngine {
583582

584583
// We had packets waiting for send when we upgraded
585584
// Send them raw
586-
func flushWaitingForPostToWebSocket() {
585+
private func flushWaitingForPostToWebSocket() {
587586
guard let ws = self.ws else {return}
588587

589588
for msg in postWait {
@@ -618,7 +617,7 @@ extension SocketEngine {
618617

619618
/// Send polling message.
620619
/// Only call on emitQueue
621-
func sendPollMessage(var msg: String, withType type: SocketEnginePacketType,
620+
private func sendPollMessage(var msg: String, withType type: SocketEnginePacketType,
622621
datas:[NSData]? = nil) {
623622
Logger.log("Sending poll: %@ as type: %@", type: logType, args: msg, type.rawValue)
624623

@@ -638,7 +637,7 @@ extension SocketEngine {
638637
}
639638
}
640639

641-
func stopPolling() {
640+
private func stopPolling() {
642641
invalidated = true
643642
session.finishTasksAndInvalidate()
644643
}

0 commit comments

Comments
 (0)