We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5da2f4 commit 0dd1ecaCopy full SHA for 0dd1eca
src/node_options.h
@@ -28,12 +28,11 @@ class HostPort {
28
29
void set_host(const std::string& host) { host_name_ = host; }
30
31
- void set_port(int port) { port_ = port; }
+ void set_port(uint16_t port) { port_ = port; }
32
33
const std::string& host() const { return host_name_; }
34
35
- int port() const {
36
- // TODO(joyeecheung): make port a uint16_t
+ uint16_t port() const {
37
CHECK_GE(port_, 0);
38
return port_;
39
}
@@ -45,7 +44,7 @@ class HostPort {
45
44
46
private:
47
std::string host_name_;
48
- int port_;
+ uint16_t port_;
49
};
50
51
class Options {
0 commit comments