Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
src/ | 03-May-2024 | - | 5,790 | 3,831 | ||
.cargo_vcs_info.json | D | 03-May-2024 | 94 | 6 | 6 | |
Android.bp | D | 03-May-2024 | 2 KiB | 62 | 58 | |
Cargo.toml | D | 03-May-2024 | 1.5 KiB | 69 | 62 | |
Cargo.toml.orig | D | 03-May-2024 | 1.1 KiB | 44 | 38 | |
LICENSE | D | 03-May-2024 | 10.6 KiB | 202 | 169 | |
LICENSE-APACHE | D | 03-May-2024 | 10.6 KiB | 202 | 169 | |
LICENSE-MIT | D | 03-May-2024 | 1 KiB | 26 | 22 | |
METADATA | D | 03-May-2024 | 674 | 24 | 22 | |
MODULE_LICENSE_APACHE2 | D | 03-May-2024 | 0 | |||
OWNERS | D | 03-May-2024 | 47 | 2 | 1 | |
README.md | D | 03-May-2024 | 2.5 KiB | 85 | 58 | |
TEST_MAPPING | D | 03-May-2024 | 444 | 24 | 23 | |
cargo2android.json | D | 03-May-2024 | 250 | 14 | 13 |
README.md
1# Socket2 2 3Socket2 is a crate that provides utilities for creating and using sockets. 4 5The goal of this crate is to create and use a socket using advanced 6configuration options (those that are not available in the types in the standard 7library) without using any unsafe code. 8 9This crate provides as direct as possible access to the system's functionality 10for sockets, this means little effort to provide cross-platform utilities. It is 11up to the user to know how to use sockets when using this crate. *If you don't 12know how to create a socket using libc/system calls then this crate is not for 13you*. Most, if not all, functions directly relate to the equivalent system call 14with no error handling applied, so no handling errors such as `EINTR`. As a 15result using this crate can be a little wordy, but it should give you maximal 16flexibility over configuration of sockets. 17 18See the [API documentation] for more. 19 20[API documentation]: https://docs.rs/socket2 21 22# Two branches 23 24Currently Socket2 supports two versions: v0.4 and v0.3. Version 0.4 is developed 25in the master branch, version 0.3 in the [v0.3.x branch]. 26 27[v0.3.x branch]: https://github.com/rust-lang/socket2/tree/v0.3.x 28 29# OS support 30 31Socket2 attempts to support the same OS/architectures as Rust does, see 32https://doc.rust-lang.org/nightly/rustc/platform-support.html. However this is 33not always possible, below is current list of support OSs. 34 35*If your favorite OS is not on the list consider contributing it! See [issue 36#78].* 37 38[issue #78]: https://github.com/rust-lang/socket2/issues/78 39 40### Tier 1 41 42These OSs are tested with each commit in the CI and must always pass the tests. 43All functions/types/etc., excluding ones behind the `all` feature, must work on 44these OSs. 45 46* Linux 47* macOS 48* Windows 49 50### Tier 2 51 52These OSs are currently build in the CI, but not tested. Not all 53functions/types/etc. may work on these OSs, even ones **not** behind the `all` 54feature flag. 55 56* Android 57* FreeBSD 58* Fuchsia 59* iOS 60* illumos 61* NetBSD 62* Redox 63* Solaris 64 65# Minimum Supported Rust Version (MSRV) 66 67Socket2 uses 1.46.0 as MSRV. 68 69# License 70 71This project is licensed under either of 72 73 * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or 74 https://www.apache.org/licenses/LICENSE-2.0) 75 * MIT license ([LICENSE-MIT](LICENSE-MIT) or 76 https://opensource.org/licenses/MIT) 77 78at your option. 79 80### Contribution 81 82Unless you explicitly state otherwise, any contribution intentionally submitted 83for inclusion in this project by you, as defined in the Apache-2.0 license, 84shall be dual licensed as above, without any additional terms or conditions. 85