'Change the underlaying socket state.
Socket starts with SOCKET_UNCONNECTED state
and then proceeds (possibly) to SOCKET_ALIVE
and then to SOCKET_DEAD'

def set_socket_state(self, newstate):

    if (self._socket_state < newstate):
        self._socket_state = newstate
