1
0

resolve.h 603 B

1234567891011121314151617181920212223
  1. #ifndef CPR_RESOLVE_H
  2. #define CPR_RESOLVE_H
  3. #include <string>
  4. #include <set>
  5. namespace cpr {
  6. class Resolve {
  7. public:
  8. std::string host;
  9. std::string addr;
  10. std::set<uint16_t> ports;
  11. Resolve(const std::string& host_param, const std::string& addr_param, const std::set<uint16_t>& ports_param = std::set<uint16_t>{80U, 443U}): host(host_param), addr(addr_param), ports(ports_param) {
  12. if (this->ports.empty()) {
  13. this->ports.insert(80U);
  14. this->ports.insert(443U);
  15. }
  16. }
  17. };
  18. } // namespace cpr
  19. #endif