爱意满满的作品展示区。
shadeofgod

又撸了个轮子, RPC-styled API for electron ipc

  •  
  •   shadeofgod ·
    zoubingwu · Mar 19, 2020 · 2721 views
    This topic created in 2270 days ago, the information mentioned may be changed or developed.

    https://github.com/shadeofgod/electron-rpc-remote

    // main process
    import ipc from 'electron-rpc-remote';
    
    let count = 0;
    
    ipc.handle({
      inc() {
        count++;
        return count;
      },
    });
    
    // renderer process
    await ipc.invokeMain('inc'); // -> 1
    
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2923 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 06:54 · PVG 14:54 · LAX 23:54 · JFK 02:54
    ♥ Do have faith in what you're doing.