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
PhoenixMessageobject with specified parameters.Declaration
Swift
public init(topic: String, event: String, payload: [String: AnyObject]? = nil)Parameters
topicThe message’s topic name.
eventAn event name.
payloadThe payload of the message.
Return Value
The
PhoenixMessage.
View on GitHub
PhoenixMessage Structure Reference