Channel Management
qrCode Event
qrCode EventPurpose: Receive a newly generated QR code from the server.
Listener:
socket.on('qrCode', (qrCode) => {
// Handle the received QR code
});
waCon:reset Event
waCon:reset EventPurpose: Request the server to reset the QR code for a channel.
Arguments:
channelId: The ID of the channel.
Callback:
data: The server's response, likely containing a new QR code.
socket.emit('waCon:reset', { channelId: id }, (data) => {
cb(data);
});
waCon Event
waCon EventPurpose: Request a QR code refresh (may be used in cases where the QR code has expired or needs updating).
Arguments:
channelId: The ID of the channel.
Callback:
data: The server's response, likely containing updated QR data.
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?