Create common.h

Common headers and functions for both client.cpp and server.cpp