okxiaoliang4 / birpc

Message-based two-way remote procedure call.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

birpc

NPM version

Message-based two-way remote procedure call. Useful for WebSockets and Workers communication.

Features

  • Intuitive - call remote functions just like locals, with Promise to get the response
  • TypeScript - safe function calls for arguments and returns
  • Protocol agonostic - WebSocket, MessageChannel, any protocols with messages communication would work!
  • Zero deps, ~0.5KB

Usage

See the test example.

Sponsors

License

MIT License © 2021 Anthony Fu

About

Message-based two-way remote procedure call.

License:MIT License


Languages

Language:TypeScript 100.0%