Classes

The following classes are available globally.

  • A class that represents a waiting ack call.

    NOTE: You should not store this beyond the life of the event handler.

    See more

    Declaration

    Swift

    public final class SocketAckEmitter : NSObject
  • A class that represents an emit that will request an ack that has not yet been sent. Call timingOut(after:callback:) to complete the emit Example:

    socket.emitWithAck("myEvent").timingOut(after: 1) {data in
        ...
    }
    
    See more

    Declaration

    Swift

    public final class OnAckCallback : NSObject
  • Represents some event that was received.

    See more

    Declaration

    Swift

    public final class SocketAnyEvent : NSObject
  • The main class for SocketIOClientSwift.

    NOTE: The client is not thread/queue safe, all interaction with the socket should be done on the handleQueue

    Represents a socket.io-client. Most interaction with socket.io will be through this class.

    See more

    Declaration

    Swift

    open class SocketIOClient : NSObject, SocketIOClientSpec, SocketEngineClient, SocketParsable
  • Experimental socket manager.

    API subject to change.

    Can be used to persist sockets across ViewControllers.

    Sockets are strongly stored, so be sure to remove them once they are no longer needed.

    Example usage:

    let manager = SocketClientManager.sharedManager
    manager["room1"] = socket1
    manager["room2"] = socket2
    manager.removeSocket(socket: socket2)
    manager["room1"]?.emit("hello")
    
    See more

    Declaration

    Swift

    open class SocketClientManager : NSObject