Adding tcp support, merging in code from ain-tcp
Adding tcp support, merging in code from ain-tcp