{"id":19691127,"url":"https://github.com/editso/kcp-rust","last_synced_at":"2026-01-27T18:05:50.768Z","repository":{"id":204080828,"uuid":"667099003","full_name":"editso/kcp-rust","owner":"editso","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-19T15:32:52.000Z","size":145,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-28T10:37:48.065Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/editso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-07-16T16:26:17.000Z","updated_at":"2024-09-18T22:47:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"9f17f423-cffc-4bdd-8960-68d36d75883e","html_url":"https://github.com/editso/kcp-rust","commit_stats":null,"previous_names":["editso/kcp-rust"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/editso/kcp-rust","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/editso%2Fkcp-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/editso%2Fkcp-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/editso%2Fkcp-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/editso%2Fkcp-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/editso","download_url":"https://codeload.github.com/editso/kcp-rust/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/editso%2Fkcp-rust/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28817796,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T18:01:38.485Z","status":"ssl_error","status_checked_at":"2026-01-27T18:01:27.499Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2024-11-11T19:08:08.526Z","updated_at":"2026-01-27T18:05:50.738Z","avatar_url":"https://github.com/editso.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kcp-rust\n\n# Dependencies\n```\n[dependencies]\ntokio = { version = \"*\", features = [\"full\"]}\nkcp-rust = { git = \"https://github.com/editso/kcp-rust.git\", features = [\"runtime_tokio\"]}\n```\n\n# Examples\n```\nuse kcp_rust::{KcpConnector, KcpListener};\n\n#[tokio::main]\nasync fn main(){\n    tokio::runtime::Builder::new_multi_thread()\n        .enable_all()\n        .build()\n        .unwrap()\n        .block_on(async move {\n            tokio::spawn(async move {\n                let udp = tokio::net::UdpSocket::bind(\"127.0.0.1:9999\").await.unwrap();\n\n                let kcp_listener =\n                    KcpListener::new_with_tokio(udp, Default::default()).unwrap();\n\n                let (conv, addr, mut kcp_stream) = kcp_listener.accept().await.unwrap();\n\n                let mut s = [0u8; 1024];\n\n                println!(\"connected {conv} {addr}\");\n\n                let n = kcp_stream.read(\u0026mut s).await.unwrap();\n\n                println!(\"message: {}\", String::from_utf8(s[..n].to_vec()).unwrap())\n            });\n\n            let udp = tokio::net::UdpSocket::bind(\"127.0.0.1:0\").await.unwrap();\n            udp.connect(\"127.0.0.1:9999\").await.unwrap();\n\n            let mut kcp_connector =\n                KcpConnector::new_with_tokio(udp, Default::default()).unwrap();\n            let (_, mut kcp_stream) = kcp_connector.open().await.unwrap();\n\n            kcp_stream.write(b\"hello world\").await.unwrap();\n\n            kcp_stream.shutdown().await.unwrap();\n        })\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feditso%2Fkcp-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feditso%2Fkcp-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feditso%2Fkcp-rust/lists"}