This module implements an RPC mechanism that meets the following requirements:
- Initialized from one end-point (client) to the other (server).
- A message can be sent both from server to client and from client to server.
- A question is a message that requests a response from the other end. Questions can be asked both by the server and the client.
- The end-point that receives a question can send the response asynchronously.
- All messages and responses are sent and delivered as javascript data that can be serialized as json.
- All communication is sent over a tcp socket protected with TLS.
- Communication is protected against man-in-the-middle attacks if the client and server have a trust relationship established via some other mechanism.
- The RPC mechanism exits with an error in both server and client if the communication fails.
See examples/.