Commit Graph

27 Commits (88256dbdcfc3b284f5533e5aa2969bf5061db22a)

Author SHA1 Message Date
Dario Nieuwenhuis 88256dbdcf Update to Rust 2018. Fixes #271 2020-12-27 17:54:56 +01:00
Alex Crawford c9f57150a8 Dereference match expressions to clean up patterns
These were flagged by `cargo clippy`:

    warning: you don't need to add `&` to all patterns
2020-12-26 10:32:51 -08:00
Alex Crawford 0c7cdbb4ef Remove unnecessary returns
These were flagged by `cargo clippy`:

    warning: unneeded `return` statement
2020-12-26 10:32:51 -08:00
Pierre Krieger 9c5f77dd7e Implement Hash for SocketHandle
Closes: #320
Approved by: whitequark
2019-12-23 03:53:53 +08:00
Valentin Lorentz 2afc538fd9 Add support for IPv6 to ICMP sockets.
Closes: #205
Approved by: whitequark
2018-05-10 07:12:33 +08:00
Philipp Oppermann 6b3f103c05 Return specific sockets from `new` functions instead of `Socket`.
* Add Into<Socket> implementations for sockets
* Make SocketSet::add generic over Into<Socket>
2018-01-28 14:36:23 +00:00
Dan Robertson 439e0a2cc1 Add the proto-ipv4 feature. 2017-12-24 13:28:59 +00:00
whitequark 6c83936872 Extract socket handle into a new SocketMeta structure.
This paves way for adding more metadata apart from handles,
such as caches and so on.

This commit also removes SocketHandle::EMPTY in favor of
SocketHandle::default() since they are functionally identical.
2017-11-22 03:50:09 +00:00
Dan Robertson adb5014780 Add ICMP sockets
- Add support for ICMP sockets
 - Add tests for ICMP sockets
 - Rename proto-<type> features to socket-<type>
 - Update documentation
2017-11-09 00:08:24 +00:00
whitequark d9fa7f6bc6 Rename proto-* features back to socket-*.
A proto-* feature does not make sense for ICMP, where the protocol
is always enabled, but sockets, not.
2017-11-06 09:51:03 +00:00
whitequark d37f4ef254 Use a much more sensible method naming for SocketRef. 2017-10-25 02:16:23 +00:00
whitequark 103fff9233 Expose wrapping and unwrapping of SocketRefs. 2017-10-25 01:28:59 +00:00
whitequark a9a00baa49 Rename Cargo features: socket-* → proto-*. 2017-10-25 00:20:40 +00:00
Egor Karavaev 19b1b764ed Implement a SocketRef smart pointer to detect state changes. 2017-10-05 03:44:20 +00:00
whitequark 52600cd521 Replace "socket debug identifiers" with just socket handles.
This is basically a rename that now calls an apple an apple,
except user code can no longer change it. It's not obvious if
user code getting the socket handle from the socket is very useful,
but it's not harmful either, so why not.
2017-10-05 03:02:41 +00:00
whitequark 4826d37c45 Allow disabling any of: raw, TCP or UDP sockets. 2017-09-25 00:20:22 +00:00
whitequark 8e13333988 Remove all remnants of the collections feature. 2017-09-22 20:40:13 +00:00
Egor Karavaev ca56baca65 Add `RawSocket`. 2017-06-21 03:29:31 +00:00
whitequark 493a319132 Remove the `use_` prefix from feature names.
I haven't realized that a feature `log` with an optional crate
dependency `log` activates that dependency, and added the prefix
to avoid a "clash". This is unnecessary.
2017-03-05 05:49:38 +00:00
whitequark f6d542b739 Actually close TCP sockets with 0 references during pruning. 2017-01-25 02:45:17 +00:00
whitequark 5cb4e6f760 Trace pruning of sockets from a set. 2017-01-25 02:23:10 +00:00
whitequark 62f094d276 Fix build with no alloc or collections. 2017-01-22 20:29:45 +00:00
whitequark ac38ddd936 Add reference counting to SocketSet. 2017-01-17 02:47:14 +00:00
whitequark f126eab193 Distinguish sockets by debug identifiers (socket set indexes). 2017-01-16 23:35:21 +00:00
whitequark 9fb6d6f4b2 impl Debug for SocketSet. 2017-01-12 05:42:54 +00:00
whitequark 6ccc48d647 Allow copying socket set handles.
Trying to keep them unique was kind of a losing battle anyway.
2017-01-12 04:10:24 +00:00
whitequark 234e5ef29e Implement socket sets. 2017-01-11 04:05:41 +00:00