Skip to content
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

Update HighSpeedNetIO to take in two ports instead of one #119

Merged
merged 3 commits into from Apr 16, 2021

Conversation

ajaybhargavb
Copy link
Contributor

@ajaybhargavb ajaybhargavb commented Apr 16, 2021

This is the first of a series of code quality fixes

Changes in this PR:

  • HighSpeedNetIO's constructor only takes in one port but it ends up using a second port (port+1). This could causes harder to catch bugs. The fix here is to update the constructor to take in two ports and update the caller to pass in the values correctly.
  • Updated usage in tests
  • Remove unused variables
  • A lot of code style/code formatting fixes.

I highly recommend reviewing the PR with ?w=1 (ignores whitespace diff). https://github.com/emp-toolkit/emp-tool/pull/119/files?w=1

@ajaybhargavb
Copy link
Contributor Author

int send_port;
int recv_port;

HighSpeedNetIO(const char *address, int send_port, int recv_port, bool quiet = true)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main change here

@wangxiao1254
Copy link
Member

I updated the indentation and some minor formatting so that they are consistent with the rest of the code. Everything else looks great! Thanks!

@wangxiao1254 wangxiao1254 merged commit fa237b7 into emp-toolkit:master Apr 16, 2021
@ajaybhargavb
Copy link
Contributor Author

@wangxiao1254 do you have the formatting settings that you use for this repo? That way I can use the same the next time I create PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants