Routes are just regular dicts now, which means that their ids are strings and they are bound to the key "routes".
This allows the next feature to work:
Error reporting on disconnected peers.
Define a peer_unavaliable method in your handler and you will be notified when your pipe call has failed due to an unavaliable peer.
Handled in the "meta" route.
Piping has become such an integral feature to Highway that it doesn't make sense to disable it anymore.
This is why the argument is missing in the constructor from now on.
A Highway pipe is a lightweight client -> client connection piped through the server.
The advantages of this approach are obvious:
* No need to implement the concept yourself
* It's incredibly useful
It's opt-in at the moment because it definitely isn't anywhere close to stable and requires a lot of boiler-plate code.
Documentation will be avaliable later on.
Routing.py is no more! The split made sense when ESock was used for all networking,
now it's really just a hassle to import from two different files.
CONSTANTS_FOR_EVERYTHING = 1
In case of mangled utf8 chars that throw encoding errors there is now a "last resort".
If that fails too, the data conversion behaves just like before.
After running some very scientific tests I came to the conclusion that compression does not benefit Highway in any way.
On top of that it is a nightmare to implement Highway clients in other languages (I'm looking at you JavaScript).
So to conclude: Fuck compression (and JavaScript)
Replaced receive_routes with a shared route called meta. Highway manages itself with it's own networking capabilities. (Meta as fuck)
Added NoneType to sendable types (gzip doesn't like None).
Removed old, non-reachable code.
Gave up on multiple inheritence. To inherit from Shared override_methods has to be called. It will monkey-patch all required methods. (less hacky than before)
Ripped out tons of server/client specific code and made it shared.
Highway is a wrapper around ws4py that is needed for routing and exchanging routes automatically.
Currently only the server exchanges routes with the client. This behaviour has to be replicated the other way around too.
Not all that stable.