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] -
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] -
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] -
A string representation of this packet.
Declaration
Swift
public var description: String -
The event name for this packet.
Declaration
Swift
public var event: String -
A string representation of this packet.
Declaration
Swift
public var packetString: String
-
The type of packets.
See moreDeclaration
Swift
public enum PacketType: Int
SocketPacket Structure Reference