-
Notifications
You must be signed in to change notification settings - Fork 921
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #748 from jmhersc/curlopt_localport_and_range
Support for CURLOPT_LOCALPORT and CURLOPT_LOCALPORTRANGE
- Loading branch information
Showing
9 changed files
with
148 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#ifndef CPR_LOCAL_PORT_H | ||
#define CPR_LOCAL_PORT_H | ||
|
||
#include <cstdint> | ||
|
||
namespace cpr { | ||
|
||
class LocalPort { | ||
public: | ||
// NOLINTNEXTLINE(google-explicit-constructor) | ||
LocalPort(const std::uint16_t p_localport) : localport_(p_localport) {} | ||
|
||
operator std::uint16_t() const { | ||
return localport_; | ||
} | ||
|
||
private: | ||
std::uint16_t localport_ = 0; | ||
}; | ||
|
||
} // namespace cpr | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#ifndef CPR_LOCAL_PORT_RANGE_H | ||
#define CPR_LOCAL_PORT_RANGE_H | ||
|
||
#include <cstdint> | ||
|
||
namespace cpr { | ||
|
||
class LocalPortRange { | ||
public: | ||
// NOLINTNEXTLINE(google-explicit-constructor) | ||
LocalPortRange(const std::uint16_t p_localportrange) : localportrange_(p_localportrange) {} | ||
|
||
operator std::uint16_t() const { | ||
return localportrange_; | ||
} | ||
|
||
private: | ||
std::uint16_t localportrange_ = 0; | ||
}; | ||
|
||
} // namespace cpr | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters