{"id":33939147,"url":"https://github.com/narrowlink/udp-stream","last_synced_at":"2026-04-04T12:57:54.305Z","repository":{"id":36396215,"uuid":"223583605","full_name":"narrowlink/udp-stream","owner":"narrowlink","description":"Implementation of UdpSocket same as TcpStream","archived":false,"fork":false,"pushed_at":"2025-09-28T20:49:27.000Z","size":52,"stargazers_count":41,"open_issues_count":1,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-14T03:24:24.376Z","etag":null,"topics":["async","dtls","rust","stream","tokio","udp"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/udp-stream","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/narrowlink.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-11-23T12:16:29.000Z","updated_at":"2025-10-17T16:15:10.000Z","dependencies_parsed_at":"2024-01-23T17:16:23.837Z","dependency_job_id":"f124076b-b0b5-48d0-8f21-ceae6b57d574","html_url":"https://github.com/narrowlink/udp-stream","commit_stats":null,"previous_names":["sajjadpourali/udp-stream"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/narrowlink/udp-stream","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narrowlink%2Fudp-stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narrowlink%2Fudp-stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narrowlink%2Fudp-stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narrowlink%2Fudp-stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/narrowlink","download_url":"https://codeload.github.com/narrowlink/udp-stream/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/narrowlink%2Fudp-stream/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31400460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","dtls","rust","stream","tokio","udp"],"created_at":"2025-12-12T15:14:28.585Z","updated_at":"2026-04-04T12:57:54.261Z","avatar_url":"https://github.com/narrowlink.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# udp-stream\n\n[![crates.io](https://img.shields.io/crates/v/udp-stream.svg)](https://crates.io/crates/udp-stream)\n\n\n`udp-stream` is a Rust library that provides a simple API for handling streaming data over the User Datagram Protocol (UDP), similar to TcpStream. It abstracts the complexities of working with UDP, such as handling packet fragmentation, reassembly, and flow control, making it easy for developers to send and receive continuous streams of data over UDP sockets especially when using DTLS protocol.\n\n## Features\n\n-   **Stream-based**: `udp-stream` provides an abstraction layer for handling UDP packets as a continuous stream of data, using a similar function signature as `TcpStream` in the `tokio` library. This allows developers familiar with `tokio` to leverage their existing knowledge to work with UDP in a similar manner.\n    \n-   **Lightweight**: `udp-stream` has a small footprint and only depends on the `tokio` and `bytes` libraries, making it lightweight and easy to integrate into your existing projects.\n    \n## Usage\n\nTo use `udp-stream` in your Rust project, simply add it as a dependency in your `Cargo.toml` file:\n\ntoml\n\n```[dependencies]\nudp-stream = \"0.0.12\"\n``` \n\nThen, you can import and use the library in your Rust code:\n\nrust\n\n```\nuse std::{net::SocketAddr, str::FromStr};\n\nuse tokio::io::{AsyncReadExt, AsyncWriteExt};\n\nuse udp_stream::UdpStream;\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), Box\u003cdyn Error\u003e\u003e {\n    let mut stream = UdpStream::connect(SocketAddr::from_str(\"127.0.0.1:8080\")?).await?;\n    println!(\"Ready to Connected to {}\", \u0026stream.peer_addr()?);\n    let mut buffer = String::new();\n    loop {\n        std::io::stdin().read_line(\u0026mut buffer)?;\n        stream.write_all(buffer.as_bytes()).await?;\n        let mut buf = vec![0u8; 1024];\n        let n = stream.read(\u0026mut buf).await?;\n        print!(\"-\u003e {}\", String::from_utf8_lossy(\u0026buf[..n]));\n        buffer.clear();\n    }\n}\n```\n\nFor more details on how to use `udp-stream`, including configuration options, using for DTLS, and advanced usage, please refer to the [examples](https://github.com/SajjadPourali/udp-stream/tree/master/examples).\n\n## Contributing\n\nContributions to `udp-stream` are welcome! If you would like to contribute to the library, please follow the standard Rust community guidelines for contributing, including opening issues, submitting pull requests, and providing feedback.\n\n## License\n\n`udp-stream` is licensed under the [MIT License](https://github.com/SajjadPourali/udp-stream/blob/master/LICENSE), which allows for free use, modification, and distribution, subject to the terms and conditions outlined in the license.\n\nWe hope that `udp-stream` is useful for your projects! If you have any questions or need further assistance, please don't hesitate to contact us or open an issue in the repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnarrowlink%2Fudp-stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnarrowlink%2Fudp-stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnarrowlink%2Fudp-stream/lists"}