[go: up one dir, main page]

socket2 0.3.18

Utilities for handling networking sockets with a maximal amount of configuration possible intended.
Documentation
# Refactor

* [ ] `Socket::(set_){read,write}_timeout` functions.
* [ ] `Socket::(set_)multicast_if_v4` functions.
* [ ] `Socket::keepalive` API from Mio's `TcpSocket`.
* [ ] Move all the function of `sys::Socket` as stand-alone functions.
* [ ] Remove `sys::Socket`.
* [ ] Rename `sys::SysSocket` to `sys::Socket`.
* [ ] Look at `SockAddr`.
  * [ ] Add docs about its size.


Split Socket option functions into the following categories.

Windows docs:
https://docs.microsoft.com/en-us/windows/win32/winsock/socket-options

SOL_SOCKET
IPPROTO_IP
IPPROTO_IPV6




For `IPPROTO_TCP`: Add the keepalive API from Mio.

    // TCP_KEEPCNT since Windows 10
    // TCP_KEEPIDLE since Windows 10
    // TCP_KEEPINTVL since Windows 10
    /* Linux:
      TCP_KEEPCNT (since Linux 2.4)
             The maximum number of keepalive probes TCP should send before
             dropping the connection.  This option should not be used in
             code intended to be portable.

      TCP_KEEPIDLE (since Linux 2.4)
             The time (in seconds) the connection needs to remain idle
             before TCP starts sending keepalive probes, if the socket
             option SO_KEEPALIVE has been set on this socket.  This option
             should not be used in code intended to be portable.

      TCP_KEEPINTVL (since Linux 2.4)
             The time (in seconds) between individual keepalive probes.
             This option should not be used in code intended to be
             portable.
    */