Siacoin/Sia — pull request #85 by lukechampine (2014-04-22 00:53:51+00:00)
Title: Change MessageSender interface

The `MessageSender` interface has been renamed to `MessageRouter`, and now implements `AddMessageHandler()`, which takes a `MessageHandler` and returns an `Address`. A `MessageHandler` receives an `Address` by calling `AddMessageHandler()`.

This means that `MessageRouter`s control what `Identifier`s are assigned to each `MessageHandler`. This makes a lot more sense than the `MessageHandler` telling the `MessageRouter` what `Identifier` to use. `MessageRouter`s can also call `SetAddress()` to modify a `MessageHandler`s `Address`. This would be done if, e.g., the `MessageRouter` receives a new IP address.