There, I've edited the code to handle incoming messages on the client side.