Function listenRPC

Entry point for the server-side functionality of this module

TCPListener listenRPC(API) (
  API impl,
  string address,
  ushort port,
  bool proxy_protocol,
  Duration timeout,
  RejectConnectionPredicate isBannedDg
);

This function register an implementation (impl) to listen to an RPC port and will deserialize its parameters and call it when a new request is received. It is the RPC equivalent of registerRestInterface.

Parameters

NameDescription
API The type of API that will handle the call
impl The object that will handle the call
address The address to bind to (netmask, e.g. 0.0.0.0 for all)
port The port to bind to
proxy_protocol The Proxy Protocol V1 is enabled
timeout timeout for reading a response
isBannedDg Delegate for checking if sending peer is banned