{"id":16261207,"url":"https://github.com/shouchenicu/unet","last_synced_at":"2025-04-08T14:16:11.104Z","repository":{"id":176013600,"uuid":"654855944","full_name":"ShouChenICU/Unet","owner":"ShouChenICU","description":"Unet is a lightweight and high performance UDP net framework developed using pure Java, it based on event model drive and used synchronous non-blocking IO.","archived":false,"fork":false,"pushed_at":"2023-08-21T15:54:12.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T10:30:18.783Z","etag":null,"topics":["client","lightweight","net","nio","non-blocking-io","server","udp"],"latest_commit_sha":null,"homepage":"","language":"Java","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/ShouChenICU.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-06-17T06:30:18.000Z","updated_at":"2023-06-17T09:34:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"ebbb20a3-0b31-44bf-a5c1-921578ccb534","html_url":"https://github.com/ShouChenICU/Unet","commit_stats":null,"previous_names":["shouchenicu/unet"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShouChenICU%2FUnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShouChenICU%2FUnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShouChenICU%2FUnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShouChenICU%2FUnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShouChenICU","download_url":"https://codeload.github.com/ShouChenICU/Unet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247856542,"owners_count":21007621,"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":["client","lightweight","net","nio","non-blocking-io","server","udp"],"created_at":"2024-10-10T16:40:46.924Z","updated_at":"2025-04-08T14:16:11.077Z","avatar_url":"https://github.com/ShouChenICU.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unet\n\nUnet is a lightweight and high performance UDP net framework developed using pure Java,\nit based on event model drive and used synchronous non-blocking IO.\n\n## Usage\n\n```java\nUnet unet = Unet.spawn(new UnetConfig().bindPort(1234));\nunet.pipeline().addInboundHandler(buffer -\u003e {\n    // Do something...\n    // Pass to the next processor\n    UnetContext.doRead(buffer);\n}).addInboundHandler(buffer -\u003e {\n    // Do something...\n}).addOutboundHandler(buffer -\u003e {\n    // Outbound handler chain\n    // Do something\n    UnetContext.doSend(buffer);\n});\n\n// Async send messages\nunet.fireSend(\n        ByteBuffer.wrap(\"hello\".getBytes(StandardCharsets.UTF_8)),\n        new InetSocketAddress(\"target address\", 1234)\n);\n\n// Sync send messages\nunet.fireSend(\n        ByteBuffer.wrap(\"hello\".getBytes(StandardCharsets.UTF_8)),\n        new InetSocketAddress(\"target address\", 1234)\n).sync();\n// sync call is synchronized, is equivalent to this\nunet.pipeline().doSend(\n        ByteBuffer.wrap(\"hello\".getBytes(StandardCharsets.UTF_8)),\n        new InetSocketAddress(\"target address\", 1234)\n);\n\n// Broadcast\nunet.fireBroadcast(\n        ByteBuffer.wrap(\"hello\".getBytes(StandardCharsets.UTF_8)),\n        1234\n);\n```\n\n## Build\n\n**Requirement**\n\n- JDK11+\n- maven3\n\n**Command**\n\n```shell\nmvn clean package\n```\n\nNow you can see it in the target folder.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshouchenicu%2Funet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshouchenicu%2Funet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshouchenicu%2Funet/lists"}