PhoenixMessage
public struct PhoenixMessage : CustomStringConvertible, Hashable
The PhoenixMessage
struct defines the messages dispatched through the Phoenix
.
-
The topic.
Declaration
Swift
public let topic: String
-
An event name.
Declaration
Swift
public let event: String
-
The message payload.
Declaration
Swift
public let payload: [String : AnyObject]?
-
The unique ref (message ID).
Declaration
Swift
public let ref: String
-
The description of the message.
Declaration
Swift
public var description: String { get }
-
Creates
PhoenixMessage
object with specified parameters.Declaration
Swift
public init(topic: String, event: String, payload: [String: AnyObject]? = nil)
Parameters
topic
The message’s topic name.
event
An event name.
payload
The payload of the message.
Return Value
The
PhoenixMessage
.