characters is going to be deprecated

This commit is contained in:
Erik Little 2017-09-25 09:09:23 -04:00
parent 1421da2aab
commit 4d30b3c951
No known key found for this signature in database
GPG Key ID: 4930B7C5FBC1A69D
2 changed files with 3 additions and 3 deletions

View File

@ -517,13 +517,13 @@ public final class SocketEngine : NSObject, URLSessionDelegate, SocketEnginePoll
switch type { switch type {
case .message: case .message:
handleMessage(String(message.characters.dropFirst())) handleMessage(String(message.dropFirst()))
case .noop: case .noop:
handleNOOP() handleNOOP()
case .pong: case .pong:
handlePong(with: message) handlePong(with: message)
case .open: case .open:
handleOpen(openData: String(message.characters.dropFirst())) handleOpen(openData: String(message.dropFirst()))
case .close: case .close:
handleClose(message) handleClose(message)
default: default:

View File

@ -184,7 +184,7 @@ extension SocketEnginePollable {
} }
func parsePollingMessage(_ str: String) { func parsePollingMessage(_ str: String) {
guard str.characters.count != 1 else { return } guard str.count != 1 else { return }
DefaultSocketLogger.Logger.log("Got poll message: \(str)", type: "SocketEnginePolling") DefaultSocketLogger.Logger.log("Got poll message: \(str)", type: "SocketEnginePolling")