SocketPacket
public struct SocketPacket : CustomStringConvertible
A struct that represents a socket.io packet.
-
The namespace for this packet.
Declaration
Swift
public let nsp: String
-
If > 0 then this packet is using acking.
Declaration
Swift
public let id: Int
-
The type of this packet.
Declaration
Swift
public let type: PacketType
-
An array of binary data for this packet.
Declaration
Swift
public internal(set) var binary: [Data] { get }
-
The data for this event.
Note: This includes all data inside of the socket.io packet payload array, which includes the event name for event type packets.
Declaration
Swift
public internal(set) var data: [Any] { get }
-
Returns the payload for this packet, minus the event name if this is an event or binaryEvent type packet.
Declaration
Swift
public var args: [Any] { get }
-
A string representation of this packet.
Declaration
Swift
public var description: String { get }
-
The event name for this packet.
Declaration
Swift
public var event: String { get }
-
A string representation of this packet.
Declaration
Swift
public var packetString: String { get }
-
The type of packets.
See moreDeclaration
Swift
enum PacketType : Int