diff --git a/Source/SocketIOClientSpec.swift b/Source/SocketIOClientSpec.swift index eaf63af..d707fbf 100644 --- a/Source/SocketIOClientSpec.swift +++ b/Source/SocketIOClientSpec.swift @@ -48,7 +48,15 @@ extension SocketIOClientSpec { /// The set of events that are generated by the client. public enum SocketClientEvent : String { - /// 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 + /// data item: the namespace that was connected to. + /// + /// ```swift + /// socket.on(clientEvent: .connect) {data, ack in + /// guard let nsp = data[0] as? String else { return } + /// // Some logic using the nsp + /// } + /// ``` case connect /// Called when the socket has disconnected and will not attempt to try to reconnect.