         }()
     }
     
-    public func start(onReceiveEvents: @escaping ([LongPollEvent]) -> ()) {
+    public func start(version: LongPollVersion, onReceiveEvents: @escaping ([LongPollEvent]) -> ()) {
         synchronyQueue.sync {
             guard !isActive else { return }
             

        
        var result: (server: String, lpKey: String, ts: String)?
        
        APIScope.Messages.getLongPollServer([.useSsl: "0", .needPts: "1", .lpVersion: "2"])
            .configure(with: Config(attemptsMaxLimit: 1, handleErrors: false))
            .onSuccess { data in
                defer { semaphore.signal() }

import Foundation

public enum LongPollVersion: String {
    static let latest = LongPollVersion.third

    case zero = "0"
    case first = "1"
    case second = "2"
    case third = "3"
}

/// Long poll client
public protocol LongPoll {
