Skip to content

Latest commit

 

History

History
429 lines (354 loc) · 16 KB

CHANGELOG.md

File metadata and controls

429 lines (354 loc) · 16 KB

0.5.7

0.5.6

0.5.5

0.5.4

  • Deprecated Socket::(bind_)device_by_index, replaced by Socket::(bind_)device_by_index_v4 for IPv4 sockets (rust-lang#432).
  • Added Socket::(bind_)device_by_index_v6 (rust-lang#432).
  • Added experimental support for the ESP-IDF framework (rust-lang#452)
  • Added Socket::{send,recv}msg and MsgHdr(Mut) types, wrapping sendmsg(2) and recvmsg(2) (rust-lang#447).
  • Added Socket::(set_)reuse_port_lb to retrieve or set SO_REUSEPORT_LB on FreeBSD (rust-lang#442).
  • Added Protocol::DIVERT on FreeBSD and OpenBSD (rust-lang#448).
  • Added Socket::protocol for Windows (using WSAPROTOCOL_INFOW) (rust-lang#470).
  • From<SocketAddrV{4,6}> for SockAddr nows sets ss_len on platforms that have the fields (most BSDs) (rust-lang#469).
  • Change Windows to use ADDRESS_FAMILY for sa_family_t, this shouldn't affect anything in practice (rust-lang#463).

0.5.3

  • Added support for two new Android targets armv7-linux-androideabi and i686-linux-android (rust-lang#434).
  • Added Socket::cookie to retrieve SO_COOKIE on Linux (rust-lang#437).

0.5.2

0.5.1

Added

Fixed

0.5.0

Changed

  • BREAKING SockAddr::init is renamed to try_init to indicate it can fail (rust-lang#328).
  • BREAKING Remove the returned Result from SockAddr::vsock, it can't fail (rust-lang#328).
  • BREAKING From<S> is now implemented using the I/O traits AsFd and AsRawSocket (rust-lang#325):
  • BREAKING renamed SockAddr::vsock_addr SockAddr::as_vsock_addr to match the IPv4 and IPv6 methods (rust-lang#334).
  • Redox now works on a stable compiler (rust-lang#326).
  • Remove copy from From<SocketAddrV{4,6}> implementation for SockAddr (rust-lang#335).
  • Marked function as constant where possible.
  • Updated to Rust edition 2021 (rust-lang#393).

Added

  • Links to OS documentation to a lot of methods (rust-lang#319).
  • I/O-safety traits (rust-lang#325):
    • AsFd for Socket (Unix only).
    • From<OwnedFd> for Socket (Unix only).
    • From<Socket> for OwnedFd (Unix only).
    • AsSocket for Socket (Windows only).
    • From<OwnedSocket> for Socket (Windows only).
    • From<Socket> for OwnedSocket (Windows only).
  • Unix socket support on Windows (rust-lang#249).
  • SockAddr::is_ipv{4,6} and SockAddr::domain (rust-lang#334).
  • Socket::nonblocking (rust-lang#348).
  • Socket::original_dst(_ipv6) (rust-lang#360).
  • Socket::(set_)recv_tclass_v6 and Socket::(set_)tclass_v6 (rust-lang#364).
  • Socket::(set_)tcp_congestion (rust-lang#371).
  • Support for various DCCP socket options in the form of (rust-lang#359):
    • Socket::(set_)dccp_service
    • Socket::dccp_available_ccids
    • Socket::dccp_qpolicy_txqlen
    • Socket::dccp_recv_cscov
    • Socket::dccp_send_cscov
    • Socket::dccp_server_timewait
    • Socket::dccp_server_timewait
    • Socket::dccp_tx_ccid
    • Socket::dccp_xx_ccid
    • Socket::set_dccp_ccid
    • Socket::set_dccp_qpolicy_txqlen
    • Socket::set_dccp_recv_cscov
    • Socket::set_dccp_send_cscov
    • Socket::set_dccp_server_timewait
    • Socket::dccp_cur_mps
  • Socket::peek_send (rust-lang#389).
  • Protocol::MPTCP (rust-lang#349).
  • Protocol::SCTP (rust-lang#356).
  • Protocol::DCCP (rust-lang#359).
  • Type::DCCP (rust-lang#359).
  • Implement Eq and Hash for SockAddr (rust-lang#374).
  • Support for QNX Neutrino (rust-lang#380).
  • Support for AIX (rust-lang#351).

0.4.10

0.4.9

0.4.8 (yanked)

This release was broken for Windows.

0.4.7

0.4.6

  • Reverted back to the winapi dependency as switch to windows-sys was a breaking change (rust-lang#340). Note that we'll will switch to windows-sys in v0.5 .
  • Disable RECVTOS on OpenBSD (rust-lang#307).
  • Derive Clone for SockAddr (rust-lang#311).
  • Fixes cfg attributes for Fuchsia (rust-lang#314).

0.4.5 (yanked)

Changed

Added

Fixed

0.4.4

Fixed

  • Libc v0.2.114 fixed an issue where ip_mreqn where was not defined for Linux s390x.

0.4.3 (yanked)

Added

0.4.2

Added

  • Socket::(set_)freebind_ipv6, getter and setter for IPV6_FREEBIND.

Fixed

  • Compilation on OpenBSD.
  • Usage of incorrect flag in Socket::(set_)freebind.

0.4.1

Added

  • Added SockAddr::new
  • Support for TCP_USER_TIMEOUT.
  • Support for IP_BOUND_IF.
  • Support for IP_TRANSPARENT.
  • Enable Socket::type on all platforms.
  • Support for uclibc (for Haiku support).
  • Added DragonFly support for TCP keepalive (KEEPINTVL/KEEPCNT).
  • Documentation for proper use of SockRef::from, and the improper use.
  • Assertion in SockRef::from to ensure the raw socket valid.

Fixed

  • Compilation on Haiku.
  • Setting TCP keepalive on Haiku and OpenBSD (by not setting it as it's not supported).
  • Size check for abstract namespaces in SockAddr::unix.
  • Set noinherit on accepted sockets on Windows when opening sockets.

0.4.0

Added

  • New all feature: enables API that is not available on all tier 1 platforms.
  • SockRef type: used to create a reference to an existing socket, e.g. std::net::TcpStream, making all methods of Socket available on it.
  • Support for vectored I/O:
    • Socket::recv_vectored, Socket::recv_with_flags.
    • Socket::recv_from_vectored, Socket::recv_from_vectored_with_flags.
    • Socket::send_vectored, Socket::send_vectored_with_flags.
    • Socket::send_to_vectored, Socket::send_to_vectored_with_flags.
    • In the Read and Write implementations.
  • Socket::new_raw, Socket::pair_raw and Socket::accept_raw methods that don't set common flags, such as the close-on-exec flag.
  • Socket::accept4: accept4(2) system call.
  • Socket::sendfile: the sendfile(2) system call.
  • Socket::set_cloexec: set the close-on-exec flag on Unix.
  • Socket::set_no_inherit: set inherit handle flag on Windows.
  • Socket::set_nosigpipe: set SO_NOSIGPIPE on Apple targets.
  • Socket::set_mark and Socket::mark, setting/getting the SO_MARK socket option.
  • Socket::set_cpu_affinity and Socket::cpu_affinity, setting/getting the SO_INCOMING_CPU socket option.
  • Socket::set_mss and Socket::mss, setting/getting the TCP_MAXSEG socket option.
  • Socket::set_freebind and Socket::freebind, setting/getting the IP_FREEBIND socket option.
  • Socket::bind_device and Socket::device, setting/getting the SO_BINDTODEVICE socket option.
  • Adopted Mio's TCP keepalive API:
    • Socket::keepalive_time,
    • Socket::keepalive_interval,
    • Socket::keepalive_retries,
    • Socket::set_tcp_keepalive.
  • Socket::is_listener getting the SO_ACCEPTCONN socket option.
  • Socket::domain getting the SO_DOMAIN socket option.
  • Socket::protocol getting the SO_PROTOCOL socket option.
  • Socket::type getting the SO_TYPE socket option.
  • Domain::for_address: the correct Domain for a std::net::SocketAddr.
  • Type::nonblocking: set SOCK_NONBLOCK.
  • Type::cloexec: set SOCK_CLOEXEC.
  • Type::no_inherit: set HANDLE_FLAG_INHERIT.
  • SockAddr::init: initialises a SockAddr.
  • MaybeUninitSlice type: a version of IoSliceMut that allows the buffer to be uninitialised, used in Socket::recv_vectored and related functions.
  • RecvFlags type: provides additional information about incoming messages, returned by Socket::recv_vectored and related functions.
  • TcpKeepalive type: configuration type for a socket's TCP keepalive parameters.

Changed

  • Repository moved to https://github.com/rust-lang/socket2.
  • BREAKING: Changed constructor functions into constants:
    • Domain::ipv4 => Domain::IPV4.
    • Domain::ipv6 => Domain::IPV4.
    • Domain::unix => Domain::UNIX.
    • Domain::packet => Domain::PACKET.
    • Type::stream => Type::STREAM.
    • Type::dgram => Type::DGRAM.
    • Type::seqpacket => Type::SEQPACKET.
    • Type::raw => Type::RAW.
    • Protocol::icmpv4 => Protocol::ICMPV4.
    • Protocol::icmpv6 => Protocol::ICMPV6.
    • Protocol::tcp => Protocol::TCP.
    • Protocol::udp => Protocol::UDP.
  • BREAKING: Changed the signature of Socket::recv, Socket::recv_vectored and related methods to accept unitialised buffers. The Read implementation can be used to read into initialised buffers.
  • BREAKING: Renamed SockAddr::as_std to as_socket.
  • BREAKING: Renamed SockAddr::as_inet to as_socket_ipv4.
  • BREAKING: Renamed SockAddr::as_inet6 to as_socket_ipv6.
  • BREAKING: Replace all previously existing features (reuseport, pair, unix) with a new all features (see above for description of the all feature).
  • Use accept4(2) with SOCK_CLOEXEC in Socket::accept, reducing the amount of system calls required.
  • Marked many functions as constant.
  • The Read implementation now calls recv(2) rather than read(2).
  • Split the impl block for the Socket type to create groupings for setting and getting different level socket options using setsockopt(2)/getsockopt(2).
  • Updated winapi depdency to version 0.3.9 and dropped unused features.

Removed

  • Removed the -rs suffix from the repository name.
  • BREAKING: Removed SockAddr::from_raw_parts, use SockAddr::init instead.
  • BREAKING: Removed Socket::into_* functions and replaced them with a From implementation:
    • Socket::into_tcp_stream => TcpStream::from(socket).
    • Socket::into_tcp_listener => TcpListener::from(socket).
    • Socket::into_udp_socket => UdpSocket::from(socket).
    • Socket::into_unix_stream => UnixStream::from(socket).
    • Socket::into_unix_listener => UnixListener::from(socket).
    • Socket::into_unix_datagram => UnixDatagram::from(socket).
  • Removed cfg-if dependency.
  • Remove redox_syscall depdency.

Fixes

  • Fixes the Andoid, Fuchsia, Haiku, iOS, illumos, NetBSD and Redox (nightly only) targets.
  • Correctly call recv_from in Socket::recv_from_with_flags (called recv previously).
  • Correctly call send_to in Socket::send_to_with_flags (called recv previously).
  • Use correct inmutable references in Socket::send_with_flags and Socket::send_out_of_band.
  • Use IPPROTO_IPV6 in Socket::join_multicast_v6 on Windows.
  • Use c_int instead of i32 where appropriate.

From v0.4.0-alpha.1 to v0.4.0-alpha.2

  • Fixes the Fuchsia target.
  • Socket::device now returns a Vec<u8> rather than CString.
  • Socket::bind_device now accepts a &[u8] rather than &CStr.

From v0.4.0-alpha.2 to v0.4.0-alpha.3

  • Socket::connect_timeout was added back.

From v0.4.0-alpha.4 to v0.4.0-alpha.5

  • Changed Socket::set_cpu_affinity and Socket::cpu_affinity to use an immutable reference.

From v0.4.0-alpha.5 to v0.4.0

  • Use SO_LINGER_SEC on macOS for Socket::get/set_linger.

0.3.16

  • Don't assume the memory layout of std::net::SocketAddr.
  • Other changes omited