Network Layer for PARSEC

Hey everyone,

I wanted to ask if there is a network layer implemented in the current parsec repository. The RFC https://github.com/maidsafe/rfcs/blob/master/text/0049-parsec/0049-parsec.md describes, that there is a command called GossipRequestRpc and GossipResponseRpc. Where can I find those commands to implement a network layer e.g. HTTP and how can I use it?

Thanks!

3 Likes

Hi,

PARSEC has no inbuilt network layer. The crate itself expects the user to pass it messages received over the network, and gives the messages to be sent in return values.

Have a look at the tests in src/functional_tests.rs - they showcase quite well how to call functions like create_gossip, handle_request, handle_response.

To give a little more context:

  • create_gossip creates a GossipRequestRpc message
  • handle_request expects a GossipRequestRpc and returns a GossipResponseRpc message
  • handle_response handles a GossipResponseRpc.

I hope that helps,
David.

7 Likes