Skip to content

Merge server_socket in to tcp_listener#4354

Merged
clemahieu merged 3 commits intonanocurrency:developfrom
clemahieu:socket_threads
Jan 10, 2024
Merged

Merge server_socket in to tcp_listener#4354
clemahieu merged 3 commits intonanocurrency:developfrom
clemahieu:socket_threads

Conversation

@clemahieu
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
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