type send receive inspired by https://github.com/udu3324/Typsnd Oh also client code from https://github.com/udu3324/Typsnd