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

Move common UDP/TCP channels functions to transport #1971

Merged
merged 8 commits into from May 14, 2019

Conversation

@SergiySW
Copy link
Collaborator

commented May 9, 2019

  • common tcp/udp channels functions moved to transport.hpp
  • added last_packet_sent time_point
  • RPC peers modified to return channel type with option "peer_details"
Move common upd/tcp channels functions to transport
- common tcp/udp channels functions moved to transport.hpp
- added last_packet_sent time_point
- RPC peers modified to return channel type with option "peer_details"

@SergiySW SergiySW added this to the V19.0 milestone May 9, 2019

@SergiySW SergiySW requested review from clemahieu and cryptocode May 9, 2019

@SergiySW SergiySW self-assigned this May 9, 2019

@SergiySW

This comment has been minimized.

Copy link
Collaborator Author

commented May 9, 2019

Breaking up #1962

@SergiySW SergiySW changed the title Move common upd/tcp channels functions to transport Move common UDP/TCP channels functions to transport May 9, 2019

@SergiySW SergiySW added this to During RC in V19 May 9, 2019

{
return nano::tcp_endpoint (endpoint_a.address (), endpoint_a.port ());
}

void nano::transport::channel::send_buffer (std::shared_ptr<std::vector<uint8_t>> buffer_a, nano::stat::detail detail_a, std::function<void(boost::system::error_code const &, size_t)> const & callback_a) const
{
send_buffer_raw (boost::asio::buffer (buffer_a->data (), buffer_a->size ()), callback (buffer_a, detail_a, callback_a));

This comment has been minimized.

Copy link
@clemahieu

clemahieu May 10, 2019

Collaborator

I think here would be a good place to call set_last_packet_sent and then all then we don't need to do that at all the send_buffer call sites and we can't accidentally forget it in the future.

This comment has been minimized.

Copy link
@SergiySW

SergiySW May 10, 2019

Author Collaborator

This will remove const from send, send_buffer, send_buffer_raw
But make things easier

This comment has been minimized.

Copy link
@SergiySW

SergiySW May 10, 2019

Author Collaborator

SergiySW added some commits May 14, 2019

@SergiySW SergiySW merged commit a691823 into nanocurrency:master May 14, 2019

1 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

SergiySW added a commit to SergiySW/raiblocks that referenced this pull request May 15, 2019

@SergiySW SergiySW referenced this pull request May 15, 2019

Merged

Fix UDP channels insert #1986

SergiySW added a commit that referenced this pull request May 15, 2019

@zhyatt zhyatt moved this from During RC to RC 3 (TBD) in V19 May 20, 2019

argakiig added a commit to argakiig/raiblocks that referenced this pull request May 22, 2019

Move common UDP/TCP channels functions to transport (nanocurrency#1971)
- common tcp/udp channels functions moved to transport.hpp
- added last_packet_sent time_point
- RPC peers modified to return channel type with option "peer_details"
- rename last_tcp_attempt to last_bootstrap_attempt
- move reserved_address () to nano::transport, reachout to nano::network
- add set_last_packet_sent to send_buffer

argakiig added a commit to argakiig/raiblocks that referenced this pull request May 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.