docs/Structs/SocketPacket.html
public struct SocketPacket : CustomStringConvertible
A struct that represents a socket.io packet.
Properties
`
nsp
`
The namespace for this packet.
Swift
public let nsp: String
`
id
`
If > 0 then this packet is using acking.
Swift
public let id: Int
`
type
`
The type of this packet.
Swift
public let type: PacketType
`
binary
`
An array of binary data for this packet.
Swift
public internal(set) var binary: [Data] { get }
`
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.
Swift
public internal(set) var data: [Any] { get }
`
args
`
Returns the payload for this packet, minus the event name if this is an event or binaryEvent type packet.
Swift
public var args: [Any] { get }
`
description
`
A string representation of this packet.
Swift
public var description: String { get }
`
event
`
The event name for this packet.
Swift
public var event: String { get }
`
packetString
`
A string representation of this packet.
Swift
public var packetString: String { get }
PacketType enum
`
PacketType
`
The type of packets.
Swift
enum PacketType : Int