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

Merge server_socket in to tcp_listener #4354

Merged
merged 3 commits into from
Jan 10, 2024

Conversation

clemahieu
Copy link
Contributor

Merges server_socket into tcp_listener. Functionality from nano::socket wasn't being used within nano::server_socket except for using the inherited boost strand. tcp_listener is changed to derive from shared_from_this since it's captured in network operation callbacks as sever_socket was previously.
Removes delays when dropping connections due to IP limits.
Improves unit test assertions.

@dsiganos
Copy link
Contributor

dsiganos commented Jan 9, 2024

The removing of the delay in accepting sockets should really be in a separate PR. It is a feature change whereas the server socket removal is a refactoring.

… attach a boost tcp acceptor to the socket class. It made no use of socket functionality.
…Removing virtual functions from the nano::socket class and marking it as final.
@clemahieu
Copy link
Contributor Author

Removed commit which modified socket timeouts. Added an additional commit which removed client_socket which was just a passthrough for socket. Marked socket as final and removed virtual functions.

Copy link
Contributor

@pwojcikdev pwojcikdev left a comment

Choose a reason for hiding this comment

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

tcp_listener is changed to derive from shared_from_this since it's captured in network operation callbacks as sever_socket was previously.

This should not be the case in a properly designed code.

@clemahieu
Copy link
Contributor Author

tcp_listener is changed to derive from shared_from_this since it's captured in network operation callbacks as sever_socket was previously.

This should not be the case in a properly designed code.

This was copied from the socket class but that's a good point, I'll see if that can be removed.

@clemahieu clemahieu merged commit 5db5c60 into nanocurrency:develop Jan 10, 2024
14 of 19 checks passed
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.

3 participants