Push
public class Push
                - 
                  
                  
The channel sending the Push
Declaration
Swift
public weak var channel: Channel? - 
                  
                  
The event, for example
phx_joinDeclaration
Swift
public let event: String - 
                  
                  
The payload, for example [“user_id”: “abc123”]
Declaration
Swift
public var payload: Payload - 
                  
                  
The push timeout. Default is 10.0 seconds
Declaration
Swift
public var timeout: TimeInterval - 
                  
                  
Resets and sends the Push
Declaration
Swift
public func resend(_ timeout: TimeInterval = Defaults.timeoutInterval)Parameters
timeoutOptional. The push timeout. Default is 10.0s
 - 
                  
                  
Sends the Push. If it has already timed out, then the call will be ignored and return early. Use
resendin this case.Declaration
Swift
public func send() - 
                  
                  
Receive a specific event when sending an Outbound message. Subscribing to status events with this method does not guarantees no retain cycles. You should pass
weak selfin the capture list of the callback. You can call `.delegateReceive(status:, to:, callback:) and the library will handle it for you.Example:
channel .send(event:"custom", payload: ["body": "example"]) .receive("error") { [weak self] payload in print("Error: ", payload) }Declaration
Swift
@discardableResult public func receive(_ status: String, callback: @escaping ((Message) -> ())) -> PushParameters
statusStatus to receive
callbackCallback to fire when the status is recevied
 - 
                  
                  
Receive a specific event when sending an Outbound message. Automatically prevents retain cycles. See
manualReceive(status:, callback:)if you want to handle this yourself.Example:
channel .send(event:"custom", payload: ["body": "example"]) .delegateReceive("error", to: self) { payload in print("Error: ", payload) }Declaration
Swift
@discardableResult public func delegateReceive<Target: AnyObject>(_ status: String, to owner: Target, callback: @escaping ((Target, Message) -> ())) -> PushParameters
statusStatus to receive
ownerThe class that is calling .receive. Usually
selfcallbackCallback to fire when the status is recevied
 
        Push Class Reference