added support for variable recv lengths
added templating
added templates
Merge pull request #3 from Badsauce/hw4

Hw4