Task API
SignalWire.Relay.TaskingAPI
This represents the API interface for the Tasking RELAY Service. A SignalWire.Relay.RelayTask is simple way to send jobs to your SignalWire.Relay.Consumer from a short lived process, like a web framework. RELAY Tasks allow you to pass commands down to your Consumers without blocking your short lived request. Think of a RELAY Task as a way to queue a job for your background workers to processes asynchronously.
For example, if you wanted to make an outbound call and play a message when your user clicks a button on your web application, since RELAY is a realtime protocol and relies on you to tell it what to do in realtime, if you did this within your web application, your web server would block until the call was finished… this may take a long time! Instead, simply create a new RELAY Task. This task will be handled by a running RELAY Consumer process and your web application can respond back to your user immediately.
Methods
Deliver
Deliver the specified message.
Parameters
Returns
bool - true if the delivery is successfully started, false if a problem is encountered.
Examples
Send a message.
Events
All these events can be used to track a task.
Receive Events
SignalWire.Relay.RelayTask
A SignalWire.Relay.RelayTask is a simple way to send jobs to your SignalWire.Relay.Consumer from a short lived process, like a web framework. RELAY Tasks allow you to pass commands down to your Consumers without blocking your short lived request. Think of a RELAY Task as a way to queue a job for your background workers to processes asynchronously.
For example, if you wanted to make an outbound call and play a message when your user clicks a button on your web application, since RELAY is a realtime protocol and relies on you to tell it what to do in realtime, if you did this within your web application, your web server would block until the call was finished… this may take a long time! Instead, simply create a new RELAY Task. This task will be handled by a running RELAY Consumer process and your web application can respond back to your user immediately.
Constructor
The only constructor is the default constructor, properties should all be assigned by initializer or after construction.
Parameters
None
Examples
Basic Example
Properties
Methods
Deliver
Deliver a message to the specified host. This is typically not used directly, TaskingAPI.Deliver is used instead.
Parameters
Returns
void
Examples
Send a message.
Events
None