{"id":20286429,"url":"https://github.com/paganini2008/embedded-io","last_synced_at":"2026-06-09T05:31:16.124Z","repository":{"id":57721975,"uuid":"335249768","full_name":"paganini2008/embedded-io","owner":"paganini2008","description":"A lightweight, high-performance, and extensible TCP/IP networking framework designed for Java developers building scalable and robust network applications. It features an event-driven, non-blocking architecture that simplifies the creation of custom communication protocols and real-time systems.","archived":false,"fork":false,"pushed_at":"2022-07-09T05:02:05.000Z","size":93,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-05T00:22:07.805Z","etag":null,"topics":["java","nio-library","socket-io","tcp-ip"],"latest_commit_sha":null,"homepage":"https://github.com/paganini2008/embedded-io","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/paganini2008.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}},"created_at":"2021-02-02T10:24:40.000Z","updated_at":"2025-04-05T22:45:15.000Z","dependencies_parsed_at":"2022-09-26T21:50:29.415Z","dependency_job_id":null,"html_url":"https://github.com/paganini2008/embedded-io","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/paganini2008/embedded-io","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paganini2008%2Fembedded-io","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paganini2008%2Fembedded-io/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paganini2008%2Fembedded-io/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paganini2008%2Fembedded-io/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paganini2008","download_url":"https://codeload.github.com/paganini2008/embedded-io/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paganini2008%2Fembedded-io/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34093773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["java","nio-library","socket-io","tcp-ip"],"created_at":"2024-11-14T14:34:06.654Z","updated_at":"2026-06-09T05:31:16.107Z","avatar_url":"https://github.com/paganini2008.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# embedded-io\nA lightweight  NIO framework with JDK8\n\n##  Compatibility\n\n* Jdk 1.8 (or later)\n\n## Install\n\n```xml\n\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.paganini2008\u003c/groupId\u003e\n  \u003cartifactId\u003eembedded-io\u003c/artifactId\u003e\n  \u003cversion\u003e2.0.4\u003c/version\u003e\n\u003c/dependency\u003e\n\n```\n\n## Quick Start\n\n**Example 1**\n\nStart Nio Server\n\n``` java\npublic static void main(String[] args) throws Exception {\n\t\tNioAcceptor server = new NioAcceptor();\n\t\tserver.getTransformer().setSerialization(new StringSerialization(), new ObjectSerialization());\n\t\tserver.setReaderBufferSize(10 * 1024);\n\t\tLoggingChannelHandler handler = new LoggingChannelHandler(\"server\");\n\t\tserver.addHandler(handler);\n\t\tserver.start();\n\t\tSystem.in.read();\n\t\tserver.stop();\n}\n```\n\nStart Nio Client\n\n``` java\npublic static void main(String[] args) throws Exception {\n\t\tNioConnector client = new NioConnector();\n\t\tclient.getTransformer().setSerialization(new ObjectSerialization(), new StringSerialization());\n\t\tclient.setWriterBufferSize(20 * 1024);\n\t\tclient.setWriterBatchSize(10);\n\t\tclient.setAutoFlushInterval(3);\n\t\tChannelHandler handler = new LoggingChannelHandler(\"client\");\n\t\tclient.addHandler(handler);\n\t\tChannel channel;\n\t\ttry {\n\t\t\tchannel = client.connect(new InetSocketAddress(8090), new ChannelPromise\u003cChannel\u003e() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(Channel channel) {\n\t\t\t\t\tSystem.out.println(channel + \" is ok\");\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onFailure(Throwable e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow e;\n\t\t}\n\t\tSystem.in.read();\n\t\tfor (int i = 0; i \u003c 10000; i++) {\n\t\t\tchannel.write(new Item(\"test_\" + i, UUID.randomUUID().toString()));\n\t\t}\n\t\tThread.sleep(60 * 1000L);\n\t\tclient.close();\n\t}\n```\n\n\n\n**Example 2**\n\nStart Aio Server\n\n``` java\npublic static void main(String[] args) throws Exception {\n\t\tAioAcceptor server = new AioAcceptor();\n\t\tserver.getTransformer().setSerialization(new StringSerialization(), new ObjectSerialization());\n\t\tserver.setReaderBufferSize(10 * 1024);\n\t\tLoggingChannelHandler handler = new LoggingChannelHandler(\"server\");\n\t\tserver.addHandler(IdleChannelHandler.readerIdle(60, 60, TimeUnit.SECONDS, IdleTimeoutListener.LOG));\n\t\tserver.addHandler(handler);\n\t\tserver.start();\n\t\tSystem.in.read();\n\t\tserver.stop();\n}\n```\n\n\n\nStart Client\n\n``` java\npublic static void main(String[] args) throws Exception {\n\t\tAioConnector client = new AioConnector();\n\t\tclient.getTransformer().setSerialization(new ObjectSerialization(), new StringSerialization());\n\t\t// client.setWriterBufferSize(20 * 1024);\n\t\tclient.addHandler(IdleChannelHandler.writerIdle(30, 60, TimeUnit.SECONDS, IdleTimeoutListener.LOG));\n\t\tclient.setWriterBatchSize(10);\n\t\tclient.setAutoFlushInterval(3);\n\t\tChannelHandler handler = new LoggingChannelHandler(\"client\");\n\t\tclient.addHandler(handler);\n\t\tChannel channel;\n\t\ttry {\n\t\t\tchannel = client.connect(new InetSocketAddress(\"127.0.0.1\", 8090), new ChannelPromise\u003cChannel\u003e() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(Channel channel) {\n\t\t\t\t\tSystem.out.println(channel + \" is ok\");\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onFailure(Throwable e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow e;\n\t\t}\n\t\tSystem.in.read();\n\t\tfor (int i = 0; i \u003c 10000; i++) {\n\t\t\tchannel.write(new Item(\"test_\" + i, UUID.randomUUID().toString()));\n\t\t}\n\t\tThread.sleep(60 * 1000L);\n\t\tclient.close();\n\t}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaganini2008%2Fembedded-io","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaganini2008%2Fembedded-io","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaganini2008%2Fembedded-io/lists"}