Created a base class for communication for both the server and client