{"id":27966500,"url":"https://github.com/techery/naga","last_synced_at":"2026-03-09T03:32:47.718Z","repository":{"id":13786920,"uuid":"16482208","full_name":"techery/Naga","owner":"techery","description":"Simplified Java NIO asynchronous sockets","archived":false,"fork":false,"pushed_at":"2014-02-03T15:07:33.000Z","size":300,"stargazers_count":30,"open_issues_count":2,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-29T12:56:49.834Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/techery.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":"2014-02-03T14:48:10.000Z","updated_at":"2024-12-17T09:29:02.000Z","dependencies_parsed_at":"2022-09-14T09:11:16.034Z","dependency_job_id":null,"html_url":"https://github.com/techery/Naga","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/techery/Naga","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techery%2FNaga","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techery%2FNaga/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techery%2FNaga/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techery%2FNaga/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/techery","download_url":"https://codeload.github.com/techery/Naga/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/techery%2FNaga/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30281510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"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":[],"created_at":"2025-05-07T20:19:08.465Z","updated_at":"2026-03-09T03:32:47.697Z","avatar_url":"https://github.com/techery.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Naga is not a framework.\n====\n\nNaga aims to be a very small NIO library that provides a handful of java classes to wrap the usual Socket and ServerSocket with asynchronous NIO counterparts (similar to NIO2 planned for Java 1.7).\n\nAll of this is driven from a single thread, making it useful for both client (e.g. allowing I/O to be done in the AWT-thread without any need for threads) and server programming (1 thread for all connections instead of 2 threads/connection).\n\nInternally Naga is a straightforward NIO implementation without any threads or event-queues thrown in, it is \"just the NIO-stuff\", to let you build things on top of it.\n\nNaga contains the code needed to get NIO up and running without having to code partially read buffers and setting various selection key flags.\n\nHere is an example opening a server socket:\n\n```java\nNIOService service = new NIOService;\nNIOServerSocket serverSocket = service.openServerSocket(1234);\nserverSocket.setConnectionAcceptor(myAcceptor);\nserverSocket.listen(myObserver);\n```\n\nThis is how working with a regular socket looks like:\n\n```java\nNIOService service = new NIOService;\nNIOSocket serverSocket = service.openSocket(\"www.google.com\", 1234);\nsocket.listen(myObserver);\n// Asynchronous write by default:\nsocket.write(\"Some message\".getBytes());\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechery%2Fnaga","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechery%2Fnaga","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechery%2Fnaga/lists"}