Added socket functionality and test
Split out req resp