File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,9 @@ pub struct MessageHandler {
21
21
/// implement Hash to meet the PeerManager API.
22
22
/// For efficiency, Clone should be relatively cheap for this type.
23
23
/// You probably want to just extend an int and put a file descriptor in a struct and implement
24
- /// send_data.
24
+ /// send_data. Note that if you are using a higher-level net library that may close() itself, be
25
+ /// careful to ensure you don't have races whereby you might register a new connection with an fd
26
+ /// the same as a yet-to-be-disconnect_event()-ed.
25
27
pub trait SocketDescriptor : cmp:: Eq + hash:: Hash + Clone {
26
28
/// Attempts to send some data from the given Vec starting at the given offset to the peer.
27
29
/// Returns the amount of data which was sent, possibly 0 if the socket has since disconnected.
You can’t perform that action at this time.
0 commit comments