Implements basic dispatching logic for client server communication