Skip to content

Commit 0bed986

Browse files
committed
Copy the crate description to the README
Also reduce the tone a bit.
1 parent 5a281ec commit 0bed986

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Socket2
22

3+
Socket2 is a crate that provides utilities for creating and using sockets.
4+
5+
The goal of this crate is to create and use a socket using advanced
6+
configuration options (those that are not available in the types in the standard
7+
library) without using any unsafe code.
8+
9+
This crate provides as direct as possible access to the system's functionality
10+
for sockets, this means little effort to provide cross-platform utilities. It is
11+
up to the user to know how to use sockets when using this crate. *If you don't
12+
know how to create a socket using libc/system calls then this crate is not for
13+
you*. Most, if not all, functions directly relate to the equivalent system call
14+
with no error handling applied, so no handling errors such as `EINTR`. As a
15+
result using this crate can be a little wordy, but it should give you maximal
16+
flexibility over configuration of sockets.
17+
318
See the [API documentation] for more.
419

520
[API documentation]: https://docs.rs/socket2

src/lib.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
//! standard library) without using any unsafe code.
2121
//!
2222
//! This crate provides as direct as possible access to the system's
23-
//! functionality for sockets, this means **no** effort to provide
24-
//! cross-platform utilities, no extra goodies, no creature comforts. It is up
25-
//! to the user to know how to use sockets when using this crate. *If you don't
26-
//! know how to create a socket using libc/system calls then this crate is not
27-
//! for you*. Most, if not all, functions directly relate to the equivalent
28-
//! system call with no error handling applied, so no handling errors such as
29-
//! [`EINTR`]. As a result using this crate can be a little wordy, but it should
30-
//! give you maximal flexibility over configuration of sockets.
23+
//! functionality for sockets, this means little effort to provide
24+
//! cross-platform utilities. It is up to the user to know how to use sockets
25+
//! when using this crate. *If you don't know how to create a socket using
26+
//! libc/system calls then this crate is not for you*. Most, if not all,
27+
//! functions directly relate to the equivalent system call with no error
28+
//! handling applied, so no handling errors such as [`EINTR`]. As a result using
29+
//! this crate can be a little wordy, but it should give you maximal flexibility
30+
//! over configuration of sockets.
3131
//!
3232
//! [`EINTR`]: std::io::ErrorKind::Interrupted
3333
//!

0 commit comments

Comments
 (0)