-
Notifications
You must be signed in to change notification settings - Fork 425
Setting source port #551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting source port #551
Conversation
@@ -110,6 +112,10 @@ struct basic_request : public basic_message<Tag> { | |||
void uri(string_type const& new_uri) const { uri_ = new_uri; } | |||
|
|||
boost::network::uri::uri const& uri() const { return uri_; } | |||
|
|||
void setSourcePort(const unsigned short port) { source_port_ = port; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename this as source_port
instead to follow the convention already set in the class.
Just a couple of comments, sorry for the very long delay @DanielBujnik -- I'm usually better about these things. 😏 |
Thanks for feedback. Getter and setter methods are now named as source_port as requested. |
@@ -110,6 +112,10 @@ struct basic_request : public basic_message<Tag> { | |||
void uri(string_type const& new_uri) const { uri_ = new_uri; } | |||
|
|||
boost::network::uri::uri const& uri() const { return uri_; } | |||
|
|||
void source_port(const unsigned short port) { source_port_ = port; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use boost::uint16_t instead of unsigned short
.
Sorry about the back-and forth here, just a couple more things. |
OK done. |
LGTM -- thanks @DanielBujnik, merging now. |
With this change it is possible to set the TCP source port of HTTP and HTTPS client requests by calling setSourcePort method of client::request object.