{"id":20576626,"url":"https://github.com/hobbyquaker/electron-ipc-rpc","last_synced_at":"2025-04-14T18:22:52.456Z","repository":{"id":57221698,"uuid":"100635134","full_name":"hobbyquaker/electron-ipc-rpc","owner":"hobbyquaker","description":"Simple and tiny RPC wrapper around electron ipc","archived":false,"fork":false,"pushed_at":"2019-02-22T15:01:53.000Z","size":45,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T22:04:48.050Z","etag":null,"topics":["electron","ipc","rpc"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hobbyquaker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-17T18:48:44.000Z","updated_at":"2023-12-15T07:25:07.000Z","dependencies_parsed_at":"2022-08-29T04:01:55.840Z","dependency_job_id":null,"html_url":"https://github.com/hobbyquaker/electron-ipc-rpc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hobbyquaker%2Felectron-ipc-rpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hobbyquaker%2Felectron-ipc-rpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hobbyquaker%2Felectron-ipc-rpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hobbyquaker%2Felectron-ipc-rpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hobbyquaker","download_url":"https://codeload.github.com/hobbyquaker/electron-ipc-rpc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248933771,"owners_count":21185542,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["electron","ipc","rpc"],"created_at":"2024-11-16T05:46:26.491Z","updated_at":"2025-04-14T18:22:52.434Z","avatar_url":"https://github.com/hobbyquaker.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# electron-ipc-rpc\n\n[![NPM version](https://badge.fury.io/js/electron-ipc-rpc.svg)](http://badge.fury.io/js/electron-ipc-rpc)\n[![dependencies Status](https://david-dm.org/hobbyquaker/electron-ipc-rpc/status.svg)](https://david-dm.org/hobbyquaker/electron-ipc-rpc)\n[![Build Status](https://travis-ci.org/hobbyquaker/electron-ipc-rpc.svg?branch=master)](https://travis-ci.org/hobbyquaker/electron-ipc-rpc)\n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)\n[![License][mit-badge]][mit-url]\n\n\u003e Simple and tiny RPC wrapper around electron ipc\n\n#### Why?\n\nI created this module because I wanted a more convenient drop-in replacement for socket.io when porting \"classic\" web \napps to electron.\n\n\n## Usage\n\n#### main\n\n```javascript\nconst Rpc = require('electron-ipc-rpc');\nconst rpc = new Rpc(electron.ipcMain, mainWindow.webContents);\n\nrpc.on('method2', (params, callback) =\u003e {\n    callback(null, 'method2 response!');\n});\n\nrpc.send('method1', [], (err, res) =\u003e {\n    console.log(res); \n});\n```\n\n#### renderer\n\n```javascript\nconst Rpc = require('electron-ipc-rpc');\nconst rpc = new Rpc(electron.ipcRenderer);\n\nrpc.on('method1', (params, callback) =\u003e {\n    callback(null, 'method1 response');\n});\n\nrpc.send('method2', [], (err, res) =\u003e {\n    console.log(res); \n});\n```\n\n#### Timeout\n\nBy default a method call times out after 30s without response. This can be changed by just overwriting `rpc.timeout` \nwith the desired millisecond value.\n\n## License\n\nMIT © [Sebastian Raff](https://github.com/hobbyquaker)\n\n[mit-badge]: https://img.shields.io/badge/License-MIT-blue.svg?style=flat\n[mit-url]: LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhobbyquaker%2Felectron-ipc-rpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhobbyquaker%2Felectron-ipc-rpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhobbyquaker%2Felectron-ipc-rpc/lists"}