As this code snippet showed, both method can send event to the render process. I am wondering what are the differences between line A and line B in the code?
ipcMain.on('async', (event, arg) => {
console.log(arg);
event.sender.send('async-reply', 2); // line A
});
ipcMain.on('sync', (event, arg) => {
console.log(arg);
event.returnValue = 4;
mainWindow.webContents.send('ping', 5); //line B
});