some basic web version working. http and tcp are separate
some basic stuff is working for both. needs a lot of refactoring to account for the global functions