Socket functions updated to deal with net2 sockets and not UNIX sockets directly. Tests files updates accordingly.