SocketIOVersion
+public enum SocketIOVersion : Int
+
+                The socket.io version being used.
+ +diff --git a/Source/SocketIO/Client/SocketIOClientOption.swift b/Source/SocketIO/Client/SocketIOClientOption.swift index 1977a92..ac1a032 100644 --- a/Source/SocketIO/Client/SocketIOClientOption.swift +++ b/Source/SocketIO/Client/SocketIOClientOption.swift @@ -27,7 +27,10 @@ import Starscream /// The socket.io version being used. public enum SocketIOVersion: Int { + /// socket.io 2, engine.io 3 case two = 2 + + /// socket.io 3, engine.io 4 case three = 3 } diff --git a/docs/12to13.html b/docs/12to13.html index 554af86..d125fb9 100644 --- a/docs/12to13.html +++ b/docs/12to13.html @@ -104,6 +104,9 @@
connect event fired.
       
     
     
   
+
+    
+
+    
+
+    + + SocketIO 16.0.0-beta2 Docs + + (100% documented) +
+ ++
+ + + +public enum SocketIOVersion : Int
+
+                The socket.io version being used.
+ +diff --git a/docs/15to16.html b/docs/15to16.html index a05e436..33e5f0b 100644 --- a/docs/15to16.html +++ b/docs/15to16.html @@ -104,6 +104,9 @@
+
@@ -229,6 +232,13 @@
This guide will help you navigate the changes that were introduced in v16.
+
+
+ +
The client now supports socket.io 3 servers. This is mostly a transparent change, however if your sever
+is socket.io 2, you must send .version(.two) as an option to the manager.
+
SocketManager(socketURL: URL(string:"http://localhost:8087/")!, config: [.version(.two)])
+
 
           
         @@ -237,8 +247,8 @@ diff --git a/docs/Classes.html b/docs/Classes.html index c6ca28b..414b658 100644 --- a/docs/Classes.html +++ b/docs/Classes.html @@ -105,6 +105,9 @@
+
@@ -515,8 +518,8 @@ or call one of the disconnectSocket methods on this class.
diff --git a/docs/Classes/OnAckCallback.html b/docs/Classes/OnAckCallback.html index 31a4ec4..2186853 100644 --- a/docs/Classes/OnAckCallback.html +++ b/docs/Classes/OnAckCallback.html @@ -105,6 +105,9 @@
+
@@ -326,8 +329,8 @@ Example:
diff --git a/docs/Classes/SocketAckEmitter.html b/docs/Classes/SocketAckEmitter.html index ed406a6..eb2e40e 100644 --- a/docs/Classes/SocketAckEmitter.html +++ b/docs/Classes/SocketAckEmitter.html @@ -105,6 +105,9 @@
+
@@ -507,8 +510,8 @@ will be emitted. The structure of the error data is [ackNum, items, theErr
       
     
     
   
 
diff --git a/docs/Classes/SocketAnyEvent.html b/docs/Classes/SocketAnyEvent.html
index a89d784..030a299 100644
--- a/docs/Classes/SocketAnyEvent.html
+++ b/docs/Classes/SocketAnyEvent.html
@@ -105,6 +105,9 @@
               
+
+                    
+                    
+                    version
+                    
+                  The version of engine.io being used. Default is three.
+ +Swift
+public private(set) var version: SocketIOVersion { get }
+
+                        
@@ -960,7 +990,7 @@ disconnect us.
                         Declaration
                         
                       +
@@ -366,7 +369,7 @@
Swift
-public private(set) weak var manager: SocketManagerSpec { get }
+                          public private(set) weak var manager: SocketManagerSpec? { get }
 
                         @@ -1845,8 +1848,8 @@ Called when the manager detects a broken connection, or when a manual reconnect diff --git a/docs/Classes/SocketManager.html b/docs/Classes/SocketManager.html index 9360d2b..41a3e5b 100644 --- a/docs/Classes/SocketManager.html +++ b/docs/Classes/SocketManager.html @@ -105,6 +105,9 @@
+
@@ -602,6 +605,32 @@ called on.
+
+                    
+                    
+                    version
+                    
+                  Swift
+public private(set) var version: SocketIOVersion { get }
+
+                        
@@ -1291,7 +1320,7 @@ releasing.
                     
                       
                       
-                        Called when the engine receives a pong message.
+                        Called when the engine receives a ping message.
 
                       
                       
@@ -1305,6 +1334,60 @@ releasing.
                     
                   
                 
+                
+                  
+                    
+                    
+                    
+                    engineDidSendPing()
+                    
+                  
+                  
+                    
+                    
+                      
+                      
+                        Called when the sends a ping to the server.
+
+                      
+                      
+                        Declaration
+                        
+                          Swift
+                          open func engineDidSendPing()
+
+                        
+                      
+                     
+                  
+                 
+                
+                  
+                    
+                    
+                    
+                    engineDidReceivePong()
+                    
+                  
+                  
+                    
+                    
+                      
+                      
+                        Called when the engine receives a pong message.
+
+                      
+                      
+                        Declaration
+                        
+                          Swift
+                          open func engineDidReceivePong()
+
+                        
+                      
+                     
+                  
+                 
                 
                   
                     
@@ -1318,7 +1401,7 @@ releasing.
                     
                       
                       
-                        Called when the sends a ping to the server.
+                        Called when the sends a pong to the server.
 
                       
                       
@@ -1647,8 +1730,8 @@ Or call 
-      © 2020 Erik. All rights reserved. (Last updated: 2020-11-07)
-      Generated by jazzy ♪♫ v0.13.5, a Realm project.
+      © 2021 Erik. All rights reserved. (Last updated: 2021-01-27)
+      Generated by jazzy ♪♫ v0.13.6, a Realm project.
     
   
 
diff --git a/docs/Classes/SocketRawAckView.html b/docs/Classes/SocketRawAckView.html
index b797d83..9d91aa8 100644
--- a/docs/Classes/SocketRawAckView.html
+++ b/docs/Classes/SocketRawAckView.html
@@ -105,6 +105,9 @@
               
                 SocketIOStatus
                
+              
+                SocketIOVersion
+               
               
                 SocketParsableError
                
@@ -351,8 +354,8 @@ will be emitted. The structure of the error data is [ackNum, items, theErr
       
      
     
   
   +
@@ -521,8 +524,8 @@ Check that your server’s api will ack the event being sent.
diff --git a/docs/Enums.html b/docs/Enums.html index d54ac3d..8c557e8 100644 --- a/docs/Enums.html +++ b/docs/Enums.html @@ -105,6 +105,9 @@
+
@@ -264,6 +267,34 @@ +
+                    
+                    
+                    SocketIOVersion
+                    
+                  The socket.io version being used.
+ + See more +Swift
+public enum SocketIOVersion : Int
+
+                        
@@ -414,8 +445,8 @@
       
     +
@@ -341,8 +344,8 @@ diff --git a/docs/Enums/SocketClientEvent.html b/docs/Enums/SocketClientEvent.html index 4a4abb8..601981a 100644 --- a/docs/Enums/SocketClientEvent.html +++ b/docs/Enums/SocketClientEvent.html @@ -105,6 +105,9 @@
+
@@ -561,8 +564,8 @@ if you are working in Objective-C.
diff --git a/docs/Enums/SocketEnginePacketType.html b/docs/Enums/SocketEnginePacketType.html index fcb68e5..34f3f75 100644 --- a/docs/Enums/SocketEnginePacketType.html +++ b/docs/Enums/SocketEnginePacketType.html @@ -105,6 +105,9 @@
+
@@ -441,8 +444,8 @@ diff --git a/docs/Enums/SocketIOClientOption.html b/docs/Enums/SocketIOClientOption.html index 67fafbd..090285a 100644 --- a/docs/Enums/SocketIOClientOption.html +++ b/docs/Enums/SocketIOClientOption.html @@ -105,6 +105,9 @@
+
@@ -815,6 +818,33 @@ over when reconnects happen.
+
+                    
+                    
+                    version(_:) 
+                    
+                  The version of socket.io being used. This should match the server version. Default is 3.
+ +Swift
+case version(SocketIOVersion)
+
+                        diff --git a/docs/Enums/SocketIOStatus.html b/docs/Enums/SocketIOStatus.html index cba2434..0bf1af0 100644 --- a/docs/Enums/SocketIOStatus.html +++ b/docs/Enums/SocketIOStatus.html @@ -105,6 +105,9 @@
+
@@ -438,8 +441,8 @@ diff --git a/docs/Enums/SocketIOVersion.html b/docs/Enums/SocketIOVersion.html new file mode 100644 index 0000000..a14acdb --- /dev/null +++ b/docs/Enums/SocketIOVersion.html @@ -0,0 +1,316 @@ + + +
+
+ + + + + + + + + + +
+ +