began adding emscripten compatibility. Depreciates tcpsocket when compiling
via emscripten due to problems with posix libraries

todo: fix memory management issues with emscripten.