emitting event on socket io using async await

Solutions on MaxInterview for emitting event on socket io using async await by the best coders in the world

showing results for - "emitting event on socket io using async await"
Melia
21 Nov 2016
1async function doesSocketAgree(){
2  await new Promise(resolve => {
3    socket.emit('doesOtherSocketAgree', otherSocketId, (answer) => {
4      resolve(answer);
5    });      
6  });
7}