some work towards a new socket system

doesn't compile or do anything yet just importing the code