| Crates.io | socket_config |
| lib.rs | socket_config |
| version | 0.1.1 |
| created_at | 2024-01-06 00:01:55.260051+00 |
| updated_at | 2024-01-10 00:06:36.467908+00 |
| description | Set up sockets according to command line option or configuration file |
| homepage | https://github.com/ahcodedthat/socket_config_rs |
| repository | https://github.com/ahcodedthat/socket_config_rs |
| max_upload_size | |
| id | 1090609 |
| size | 153,843 |
This library sets up sockets in a way that can be controlled by the user of your application, such as through a command-line option or configuration file.
For example, your application might take a command-line option --listen=SOCKET, where SOCKET is a socket address that this library parses. Socket addresses can take forms like 127.0.0.1:12345 (IPv4), [::1]:12345 (IPv6), ./my.socket (Unix-domain), or fd:3 (Unix file descriptor or Windows socket handle inherited from the parent process).
This library primarily opens socket2::Sockets. The convert module contains utilities to convert those sockets to standard library socket types (like std::net::TcpListener) or Tokio socket types (like tokio::net::TcpListener). This library also has a utility function for preparing a socket to be inherited by a child process.