Further refactorings in socket areas
Rename sock to unix
Removing more duplicate code in sockets