Acknowledgments
Use the acknowledgements
by passing the second parameter to the emitting method.
caution
Make sure your server is supporting the acknowledgements! When using default client, make sure you pass the id of the event in returning event, when using custom adapters, you have to implement according to it's specification.
sendChatMessage.emit({ data: { messsage: "some message" } }, (error, data) => {
if (error) {
alert("No server response!");
} else {
alert("Message received on server.");
}
});