I have a socket instance class for sending and receiving messages. The class works fine, I receive and send messages accordingly. My problem is I need to change a state from