{"id":13632714,"url":"https://github.com/smol-rs/async-net","last_synced_at":"2025-05-15T07:06:44.072Z","repository":{"id":45840060,"uuid":"277072073","full_name":"smol-rs/async-net","owner":"smol-rs","description":"Async networking primitives for TCP/UDP/Unix communication","archived":false,"fork":false,"pushed_at":"2025-01-19T15:51:25.000Z","size":71,"stargazers_count":131,"open_issues_count":3,"forks_count":15,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-06T13:12:07.545Z","etag":null,"topics":["async","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smol-rs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-07-04T08:40:20.000Z","updated_at":"2025-05-06T04:54:08.000Z","dependencies_parsed_at":"2024-11-09T01:30:58.857Z","dependency_job_id":"828c2be3-92c3-4f70-9eab-3935bf356b7c","html_url":"https://github.com/smol-rs/async-net","commit_stats":{"total_commits":74,"total_committers":6,"mean_commits":"12.333333333333334","dds":0.5,"last_synced_commit":"2b34b162b96c223c4a945fcf15e71c7ef5ed8c84"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smol-rs%2Fasync-net","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smol-rs%2Fasync-net/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smol-rs%2Fasync-net/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smol-rs%2Fasync-net/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smol-rs","download_url":"https://codeload.github.com/smol-rs/async-net/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253837406,"owners_count":21971983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","rust"],"created_at":"2024-08-01T22:03:11.834Z","updated_at":"2025-05-15T07:06:39.033Z","avatar_url":"https://github.com/smol-rs.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# async-net\n\n[![Build](https://github.com/smol-rs/async-net/workflows/Build%20and%20test/badge.svg)](\nhttps://github.com/smol-rs/async-net/actions)\n[![License](https://img.shields.io/badge/license-Apache--2.0_OR_MIT-blue.svg)](\nhttps://github.com/smol-rs/async-net)\n[![Cargo](https://img.shields.io/crates/v/async-net.svg)](\nhttps://crates.io/crates/async-net)\n[![Documentation](https://docs.rs/async-net/badge.svg)](\nhttps://docs.rs/async-net)\n\nAsync networking primitives for TCP/UDP/Unix communication.\n\nThis crate is an async version of [`std::net`] and [`std::os::unix::net`].\n\n[`std::net`]: https://doc.rust-lang.org/std/net/index.html\n[`std::os::unix::net`]: https://doc.rust-lang.org/std/os/unix/net/index.html\n\n## Implementation\n\nThis crate uses [`async-io`] for async I/O and [`blocking`] for DNS lookups.\n\n[`async-io`]: https://docs.rs/async-io\n[`blocking`]: https://docs.rs/blocking\n\n## Examples\n\nA simple UDP server that echoes messages back to the sender:\n\n```rust\nuse async_net::UdpSocket;\n\nlet socket = UdpSocket::bind(\"127.0.0.1:8080\").await?;\nlet mut buf = vec![0u8; 1024];\n\nloop {\n    let (n, addr) = socket.recv_from(\u0026mut buf).await?;\n    socket.send_to(\u0026buf[..n], \u0026addr).await?;\n}\n```\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n#### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmol-rs%2Fasync-net","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmol-rs%2Fasync-net","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmol-rs%2Fasync-net/lists"}