def METHOD_NAME(self):
    '''stop listening for packets'''
    if self.sock is not None:
        self.sock.close()
        self.sock = None
    if self.listen_sock is not None:
        self.listen_sock.close()
        self.listen_sock = None
    self.last_baudrate = 0