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.
create_routes now doesn't launch them automatically because routes are put together before the socket actually becomes avaliable.
create_exchange_map previously used the wrong index for the route list.
There is now a universal Route class from which ServerRoute and ClientRoute inherit.
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.