channelTopic
Name of channel/Topic
string
event
Event name to unsubscribe to
string
All the methods associated with the socket channels
This method will subscribe phoenix channel for the given channelTopic and given events
Recommended that you already have made a socket connection by using connectPhoenix method before using this method.
Parameter | Description | Type | Required |
---|---|---|---|
channelTopic
Name of channel/Topic
string
logPresence
Determines if presence should be tracked for the channel
boolean
token
private token for channel
string
additionalData
This data will be available for you as additionalData on the response
object
events
Array of event names to subscribe to and will dispatch response to eventActionType
{
eventName:string; eventActionType:string
} []
domainUrl
socket endpoint to connect to
string
channelTopic
Name of channel/Topic
string
events
Array of event names to unsubscribe to
string []
channelTopic
Name of channel/Topic
string
This method will attempt to find the subscribed phoenix channel for the given channelTopic and push data to the channel for the eventName.
Recommended that you already have made a socket connection by using connectPhoenix method before using this method.
Parameter | Description | Type | Required |
---|---|---|---|
channelTopic
Name of channel/Topic
string
eventName
Name of the event on channel to push to
string
requestData
Payload data to push on the channel
any
additionalData
This data will be available for you as additionalData on the response
object
loadingStatusKey
A unique identifier you can use to separate progress status
string
endProgressDelay
timeout in milliseconds if you want to delay the endProgress of your loadingStatusKey
number
channelResponseEvent
name of redux event to dispatch to reducer on response from pushing to channel
string
channelErrorResponseEvent
name of redux event to dispatch to reducer on error from pushing to channel
string
channelTimeOutEvent
name of redux event to dispatch to reducer on timeout from pushing to channel
string
dispatchChannelError
false by default, determines if should an on channel error occur dispatch PHOENIX_CHANNEL_ERROR to the reducer
boolean
channelPushTimeOut
timeout in milliseconds for pushing to the channel, default is 1500
number