renproject / aw

A flexible P2P networking library for upgradable distributed systems.
MIT License
38 stars 18 forks source link

Chore/simplify ip retrieval #79

Closed rahulghangas closed 3 years ago

rahulghangas commented 3 years ago

Removes the need to add and delete ip address from table. There are two primary reasons for not having the current usage of ip addresses with the peer table

Rather, we define a new struct Packet in the wire package that includes both the message and the ip address. The inbound channel queue now accepts a wire.Packet instead of a wire.Msg, from which we can extract the message and the ip address and pass it as an additional argument to the receive callback function

rahulghangas commented 3 years ago

No particular reason, although just using wire.Packet would be better. I'll update it