Note: This is a fork of kyranet/veza We use
msgpackr
instead ofbinarytf
for encoding/decoding messages
@sofidev/ipc is a protocol that operates over either IPC or TCP with the only difference of one line of code to switch between the two. Inspired on node-ipc, it seeks to use modern, fast, and intuitive APIs, as well as exposing all the underlying back-ends for much higher customizability and extensibility, as well as a HTTP-like protocol where you can send a message and optionally receive a response for it.
- Unix Socket or Windows Socket.
- TCP Socket.
- TLS Socket.
- UDP Sockets.
TLS: TLS sockets can be achieved by extending
@sofidev/ipc
to use SSL handshakes. To keep things simple and tidy, this is not shipped in core, but will be considered for future releases.
UDP: UDP sockets are not supported due to
@sofidev/ipc
's requirement for messages to be reliably received in order.
All messages are encoded and decoded using msgpackr
, which allows a messages to be sent using the least
amount of bytes possible, increasing throughput; plus a 11-byte header at the start of each message. More information
available in PROTOCOL.
You can find examples of code here.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request!