{"id":13487135,"url":"https://github.com/jsbintask22/netty-learning","last_synced_at":"2025-07-27T02:03:07.532Z","repository":{"id":37741311,"uuid":"168255349","full_name":"jsbintask22/netty-learning","owner":"jsbintask22","description":"bio, nio到 netty各种使用案例， 包含基础使用案例，各api使用方法，零拷贝，websocket，群聊，私聊，编码，解码，自定义协议，protobuf等使用案例,rpc服务器，客户端等等学习","archived":false,"fork":false,"pushed_at":"2024-05-16T17:21:39.000Z","size":1528,"stargazers_count":63,"open_issues_count":2,"forks_count":34,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T15:22:02.545Z","etag":null,"topics":["bio","http","java8","netty","nio","rpc","server","springboot","websocket"],"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/jsbintask22.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":"2019-01-30T01:03:15.000Z","updated_at":"2025-02-16T01:39:08.000Z","dependencies_parsed_at":"2024-10-13T04:40:58.158Z","dependency_job_id":"46232225-22ab-4447-a013-b329926f8aa9","html_url":"https://github.com/jsbintask22/netty-learning","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsbintask22%2Fnetty-learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsbintask22%2Fnetty-learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsbintask22%2Fnetty-learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsbintask22%2Fnetty-learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsbintask22","download_url":"https://codeload.github.com/jsbintask22/netty-learning/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248262284,"owners_count":21074281,"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":["bio","http","java8","netty","nio","rpc","server","springboot","websocket"],"created_at":"2024-07-31T18:00:55.762Z","updated_at":"2025-04-10T17:43:54.162Z","avatar_url":"https://github.com/jsbintask22.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"## netty\njdk bio，nio，aio各种使用案例，深入理解netty，结合源码以及文章分析：\n1. jdk原生nio的Buffer使用\n2. jdk原生的nio channel使用\n3. jdk原生的nio网络编程\n4. jdk原生的reactor编程模型（使用selector） 聊天室\n5. 零拷贝使用案例  文件上传\n6. netty 的演变模型（3中reactor使用案例   线程池的添加时机）.\n7. netty的启动源码（对照之前jdk的写法分析） NioEventLoopGroup 中的成员变量分析（线程池）\n8. ChannelHandlerContext和ChannelPipeLine以及Channel的关系\n9. 使用netty自带的编码解码器编写一个聊天室\n10. 在9的基础上加入私聊功能\n11. 在10的基础上加入protobuf的反序列化，提高效率\n12. netty在解码过程中的拆包，粘包（由于不知道传输过程是否会一次性传过来一个协议的数据）ByteToMessageDecoder\n13. handler执行顺序，结合12  分析 入站， 出站 代码， MessageToByteEncoder\n13. writeAndFlush在 channel和ChannelHandlerContext中的区别 (调换 Encoder的位置，找出区别， 最后debug到HeadContext 的flush方法）\n以及执行过程（executemask的作用）  writeAndFlush 源码执行流程\n14. channel最后flush的时候调用javaChannel() write 生成了一个DirectByteBuff 可以提高效率\n16. EventExecutorGroup  EventExecutor\n                        EventLoopGroup  EventLoop  SingleThreadEventLoop  NioEventLoop 关系\n\n17. debug NioEventLoop的源码run (processSelectedKeys(注意finally块有一个runAllTasks方法，确保完成所有channel事件后，在从这个线程执行所有的task任务）-\u003e\nprocessSelectedKeysPlain)，跟踪ChannelPipeline的初始read() 触发是怎么开始的\n\n18. NioServerSocketChannel是如何被创建的以及是如何真正绑定java channel的\n19. to be continue...","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsbintask22%2Fnetty-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsbintask22%2Fnetty-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsbintask22%2Fnetty-learning/lists"}