Acara memancarkan di socket.io menggunakan async menunggu

async function doesSocketAgree(){
  await new Promise(resolve => {
    socket.emit('doesOtherSocketAgree', otherSocketId, (answer) => {
      resolve(answer);
    });      
  });
}
Shy Squirrel