Class MessageRouter


  • public class MessageRouter
    extends Object
    A trait defining behavior for routing an [`OnionMessage`]. [`OnionMessage`]: msgs::OnionMessage
    • Method Detail

      • destroy

        public void destroy()
        Destroys the object, freeing associated resources. After this call, any access to this object may result in a SEGFAULT or worse. You should generally NEVER call this method. You should let the garbage collector do this for you when it finalizes objects. However, it may be useful for types which represent locks and should be closed immediately to avoid holding locks until the GC runs.
      • find_path

        public Result_OnionMessagePathNoneZ find_path​(byte[] sender,
                                                      byte[][] peers,
                                                      Destination destination)
        Returns a route for sending an [`OnionMessage`] to the given [`Destination`]. [`OnionMessage`]: msgs::OnionMessage