This repository has been archived by the owner on Nov 15, 2019. It is now read-only.
Clean up endpoints etc #478
Merged
dirvine
merged 14 commits into
maidsafe-archive:master
from
ustulation:clean-up-endpoints-etc
Jan 13, 2016
Merged
Clean up endpoints etc #478
dirvine
merged 14 commits into
maidsafe-archive:master
from
ustulation:clean-up-endpoints-etc
Jan 13, 2016
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
ustulation
commented
Jan 13, 2016
Use socketAddr.ip .port etc. rather than further encapsulate these
Removed Acceptor (we only listen on tcp now)
r? @vinipsmaker (maidsafe_highfive has picked a reviewer for you, use r? to override) |
r? @dirvine |
@@ -179,7 +174,7 @@ impl UdpData { | |||
|
|||
pub fn send_to(&self, destination: SocketAddr) { | |||
let buf = [0u8; 256]; | |||
assert!(self.socket.send_to(&buf, destination).is_ok()); | |||
assert!(self.socket.send_to(&buf, &*destination).is_ok()); |
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.
?!?!?!
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.
We implemented Deref
for our socket_addr::socketAddr
to give a std::net::ScoketAddr
so this is a dereferenced SocketAddr by reference :-( It is mostly because we wish to serialise SocketAddr and that was not implemented for net::SocketAddr, although the addition of having to deal with ip::IpAddr
does add even more confusion to the code, just not specifically here.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.