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.
poll_rate can now be modified by clients
unsubscribe_all call added for disconnecting clients ("unsubscribe")
Improved logic that determines which sensors need to be queried
Identify plays a sound when it receives data
kwargs can now be set on init which allows for additional parameters on events.
Will have to go over all the code to implement a standardised solution.
The port of the Wallaby client has kicked off and with it come lots of broken features.
WallabyControl will have to be remade to incorporate piping and routes for sensor readouts as well as wi-fi network selection have to be added.
As a quick piping demo the Hostname changer route was implemented which already works in the Sublime Text client.
Highway requires new init logic to be able to access all currently connected peers.
After a little bit of reverse engineering deemed this to be the least hacky way to obtain access.
Initial version of Peers. This route can be used to retrieve client ids, which are required for piping.
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.
Highway has changed fl0w. In a good way I presume but still: Legacy code has to be updated and made good.
This entails a rework of the menu system which is now officially under way and utilises the new magic features of SublimeMenu.
MORE_CONSTANTS = 1
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.
Patching is completely gone in this version and will be kept out as long as possible.
meta is not handled as a normal route anymore and will be ignored on exchange map creation.
Routes don't require a start method anymore.
The server is now completely ported over to Highway without much regression (except WallabyControl, but that was shite anyway)
The old code the accumulated during the port also was removed.