This package comes with some out-of-the-box Actions, but you can (and probably will need) build your own for your own needs by extending the existent ones or creating new.
Conveyor\Actions\AddListenerAction
Action responsible for adding listeners to a connection. This way messages will be filtered.
Structure:
{
"action": "add-listener",
"listen": "action-name"
}
Conveyor\Actions\AssocUserToFdAction
Action responsible for associating users to connections.
Structure:
{
"action": "assoc-user-to-fd-action",
"userId": 1
}
Conveyor\Actions\BaseAction
This is the base action. Works like a ping pong, returning the message to the client who sent it.
Structure:
{
"action": "base-action",
"data": "message"
}
If the message sent to the server is plain text instead of json, this actino will be the one selected by Socket Conveyor.
Conveyor\Actions\BroadcastAction
This is for messages to be broadcasted on the context of the connection that dispatches it.
Structure:
{
"action": "broadcast-action",
"data": "message"
}
Conveyor\Actions\ChannelConnectAction
Action used to connect to a channel.
Structure:
{
"action": "channel-connect",
"channel": "channel-name"
}
Conveyor\Actions\ChannelDisconnectAction
Action used to disconnect from a channel.
Structure
{
"action": "channel-disconnect"
}
Conveyor\Actions\FanoutAction
Action used to broadcast without context borders (to every client in the server).
{
"action": "fanout-action",
"data": "message"
}