refactor SocketEngine#sendPing
This commit is contained in:
parent
01a699c7c6
commit
f7b064d80f
@ -514,11 +514,7 @@ public class SocketEngine: NSObject, WebSocketDelegate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func sendPing() {
|
func sendPing() {
|
||||||
if self.websocket {
|
self.write("", withType: PacketType.PING, withData: nil)
|
||||||
self.sendWebSocketMessage("", withType: PacketType.PING)
|
|
||||||
} else {
|
|
||||||
self.sendPollMessage("", withType: PacketType.PING)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func sendPollMessage(var msg:String, withType type:PacketType,
|
private func sendPollMessage(var msg:String, withType type:PacketType,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user