Moved libsocket to src directory

Added a couple of macros