We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 141b0ce commit beaa4b6Copy full SHA for beaa4b6
Source/SocketIOClientSpec.swift
@@ -48,7 +48,15 @@ extension SocketIOClientSpec {
48
49
/// The set of events that are generated by the client.
50
public enum SocketClientEvent : String {
51
- /// Emitted when the client connects. This is also called on a successful reconnection.
+ /// Emitted when the client connects. This is also called on a successful reconnection. A connect event gets one
52
+ /// data item: the namespace that was connected to.
53
+ ///
54
+ /// ```swift
55
+ /// socket.on(clientEvent: .connect) {data, ack in
56
+ /// guard let nsp = data[0] as? String else { return }
57
+ /// // Some logic using the nsp
58
+ /// }
59
+ /// ```
60
case connect
61
62
/// Called when the socket has disconnected and will not attempt to try to reconnect.
0 commit comments