def getSocketState(self):
        # Figure out the state of our UDP socket.
        if self.stopping_protocol:
            return 'dying'
        elif not self.transport:
            return 'dead'
        elif hasattr(self.transport, "d"):
            return 'dying'
        else:
            return 'alive'