Campaign Management
To Start And Stop Campaign
campagain:start Event
campagain:start EventPurpose: Initiate a campaign on the server.
Arguments:
campagainId: The ID of the campaign to start.stop: (optional) A boolean flag to immediately stop the campaign (if set to true).
socket.emit('campaign:start', { campagainId, stop: false }, (res) => {
cb(res);
});
campagain:stop Event
campagain:stop EventPurpose: Stop a running campaign on the server.
Arguments:
campagainId: The ID of the campaign to stop.
Callback:
res: The server's response to the stop request.
socket.emit('campaign:stop', { campagainId }, (res) => {
cb(res);
});
Important Notes
Replace
cbwith your actual callback functions for handling server responses.The server-side implementation of Socket.IO will need to complement the events and responses defined in this document.
Consider adding error handling for robustness.
Last updated
Was this helpful?