exit is from stdlib
modularized the socket utils into socket_util