| Line | 
      Branch | 
      Exec | 
      Source | 
    
    
      | 1 | 
      
       | 
       | 
      /***************************************************************************** | 
    
    
      | 2 | 
      
       | 
       | 
       * | 
    
    
      | 3 | 
      
       | 
       | 
       * Copyright (C) 2022 Bjarne von Horn (vh at igh dot de). | 
    
    
      | 4 | 
      
       | 
       | 
       * | 
    
    
      | 5 | 
      
       | 
       | 
       * This file is part of the PdCom library. | 
    
    
      | 6 | 
      
       | 
       | 
       * | 
    
    
      | 7 | 
      
       | 
       | 
       * The PdCom library is free software: you can redistribute it and/or modify | 
    
    
      | 8 | 
      
       | 
       | 
       * it under the terms of the GNU Lesser General Public License as published by | 
    
    
      | 9 | 
      
       | 
       | 
       * the Free Software Foundation, either version 3 of the License, or (at your | 
    
    
      | 10 | 
      
       | 
       | 
       * option) any later version. | 
    
    
      | 11 | 
      
       | 
       | 
       * | 
    
    
      | 12 | 
      
       | 
       | 
       * The PdCom library is distributed in the hope that it will be useful, but | 
    
    
      | 13 | 
      
       | 
       | 
       * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | 
    
    
      | 14 | 
      
       | 
       | 
       * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public | 
    
    
      | 15 | 
      
       | 
       | 
       * License for more details. | 
    
    
      | 16 | 
      
       | 
       | 
       * | 
    
    
      | 17 | 
      
       | 
       | 
       * You should have received a copy of the GNU Lesser General Public License | 
    
    
      | 18 | 
      
       | 
       | 
       * along with the PdCom library. If not, see <http://www.gnu.org/licenses/>. | 
    
    
      | 19 | 
      
       | 
       | 
       * | 
    
    
      | 20 | 
      
       | 
       | 
       *****************************************************************************/ | 
    
    
      | 21 | 
      
       | 
       | 
       | 
    
    
      | 22 | 
      
       | 
       | 
      /** @file */ | 
    
    
      | 23 | 
      
       | 
       | 
       | 
    
    
      | 24 | 
      
       | 
       | 
      #ifndef PDCOM5_CLIENTSTATISTICS_H | 
    
    
      | 25 | 
      
       | 
       | 
      #define PDCOM5_CLIENTSTATISTICS_H | 
    
    
      | 26 | 
      
       | 
       | 
       | 
    
    
      | 27 | 
      
       | 
       | 
      #include <chrono> | 
    
    
      | 28 | 
      
       | 
       | 
      #include <cstddef> | 
    
    
      | 29 | 
      
       | 
       | 
      #include <string> | 
    
    
      | 30 | 
      
       | 
       | 
       | 
    
    
      | 31 | 
      
       | 
       | 
      namespace PdCom { | 
    
    
      | 32 | 
      
       | 
       | 
       | 
    
    
      | 33 | 
      
       | 
       | 
      /** Statistics about a connected client. | 
    
    
      | 34 | 
      
       | 
       | 
       * | 
    
    
      | 35 | 
      
       | 
       | 
       * Can be fetched using Process::getClientStatistics(). | 
    
    
      | 36 | 
      
       | 
       | 
       * | 
    
    
      | 37 | 
      
       | 
       | 
       */ | 
    
    
      | 38 | 
      
       | 
      30 | 
      struct ClientStatistics | 
    
    
      | 39 | 
      
       | 
       | 
      { | 
    
    
      | 40 | 
      
       | 
       | 
          std::string name_; /**< Text as specified using the name attribute in | 
    
    
      | 41 | 
      
       | 
       | 
                               `<remote_host/>`. */ | 
    
    
      | 42 | 
      
       | 
       | 
          std::string application_name_;            /**< Text as specified using the | 
    
    
      | 43 | 
      
       | 
       | 
                                                      applicationname attribute | 
    
    
      | 44 | 
      
       | 
       | 
                                                      in `<remote_host/>`.*/ | 
    
    
      | 45 | 
      
       | 
       | 
          std::size_t received_bytes_;              /**< Received bytes. */ | 
    
    
      | 46 | 
      
       | 
       | 
          std::size_t sent_bytes_;                  /**< Transmitted bytes. */ | 
    
    
      | 47 | 
      
       | 
       | 
          std::chrono::nanoseconds connected_time_; /**< Time when client | 
    
    
      | 48 | 
      
       | 
       | 
                                                      connected. */ | 
    
    
      | 49 | 
      
       | 
       | 
      }; | 
    
    
      | 50 | 
      
       | 
       | 
       | 
    
    
      | 51 | 
      
       | 
       | 
      }  // namespace PdCom | 
    
    
      | 52 | 
      
       | 
       | 
       | 
    
    
      | 53 | 
      
       | 
       | 
       | 
    
    
      | 54 | 
      
       | 
       | 
      #endif  // PDCOM5_CLIENTSTATISTICS_H | 
    
    
      | 55 | 
      
       | 
       | 
       |