docs: def socket_monitor_loop(self):
          ''' Monitor the socket and log captured data. '''
          try:
              while True:
                  gevent.socket.wait_read(self.socket.fileno())
  
                  self._handle_log_rotations()
                  self.capture_packet()
          finally:
              self.clean_up()