Crates.io | socket2-plus |
lib.rs | socket2-plus |
version | 0.2.1 |
source | src |
created_at | 2024-09-16 00:10:17.742962 |
updated_at | 2024-09-29 15:32:10.780395 |
description | A superset of socket2 with additional safe APIs |
homepage | |
repository | https://github.com/keepsimple1/socket2-plus |
max_upload_size | |
id | 1375877 |
size | 363,247 |
This library is a superset of socket2
and it aims to provide some additional APIs currently missing from socket2
. This library can be used as a drop-in replacement for socket2
.
The following APIs are added:
recv_from_initialized
to support recv_from
with a fully initialized buffer.recvmsg_initialized
to support recvmsg
and MsgHdrInit
with initialized buffers.recvmsg_initialized
.set_pktinfo_v4
and set_recv_pktinfo_v6
to support IP_PKTINFO and IPV6_PKTINFO socket options.See documentation for more details.
See test cases send_to_recv_from_init
and sent_to_recvmsg_init_v4
.
All new APIs are built and tested on macOS
, Linux
and Windows
. For other platforms, the new APIs are only partially or not available.
This version is forked from socket2
v0.5.7. We plan to rebase to the latest socket2
stable release regularly.
socket2-plus
uses 1.63.0 as MSRV. (same as socket2
)
This project is licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.