{"id":13487150,"url":"https://github.com/songxinjianqwe/Chat","last_synced_at":"2025-03-27T21:32:01.283Z","repository":{"id":37901203,"uuid":"92016511","full_name":"songxinjianqwe/Chat","owner":"songxinjianqwe","description":"Java NIO+多线程实现聊天室","archived":false,"fork":false,"pushed_at":"2021-02-04T17:04:10.000Z","size":7876,"stargazers_count":777,"open_issues_count":6,"forks_count":324,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-10-30T22:39:51.438Z","etag":null,"topics":["chat","java","nio","protostuff","spring","thread-pool"],"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/songxinjianqwe.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":"2017-05-22T05:57:15.000Z","updated_at":"2024-10-30T01:43:59.000Z","dependencies_parsed_at":"2022-07-18T10:39:13.197Z","dependency_job_id":null,"html_url":"https://github.com/songxinjianqwe/Chat","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/songxinjianqwe%2FChat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/songxinjianqwe%2FChat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/songxinjianqwe%2FChat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/songxinjianqwe%2FChat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/songxinjianqwe","download_url":"https://codeload.github.com/songxinjianqwe/Chat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245927342,"owners_count":20695217,"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":["chat","java","nio","protostuff","spring","thread-pool"],"created_at":"2024-07-31T18:00:55.942Z","updated_at":"2025-03-27T21:31:59.009Z","avatar_url":"https://github.com/songxinjianqwe.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"# Java基于多线程和NIO实现聊天室\n\n- 涉及到的技术点\n   - 线程池ThreadPoolExecutor\n   - 阻塞队列BlockingQueue，生产者消费者模式\n   - Selector\n   - Channel\n   - ByteBuffer\n   - ProtoStuff 高性能序列化\n   - HttpClient连接池\n   - Spring依赖注入\n   - lombok简化POJO开发\n   - 原子变量\n   - 内置锁\n   - CompletionService\n   - log4j+slf4j日志\n   \n- 实现的功能\n   - 登录注销\n   - 单聊\n   - 群聊\n   - 客户端提交任务,下载图片并显示\n   - 上线下线公告\n   - 在线用户记录\n   - 批量下载豆瓣电影的图片，并打为压缩包传输给客户端\n\n- 客户端使用方式：\n   - 登录：默认用户名是user1-user5，密码分别是pwd1-pwd5\n        - 例：打开客户端后输入用户名为user1,密码为pwd1\n   - 注销：关闭客户端即可\n   - 单聊：@username:message\n        - 例：@user2:hello\n   - 群聊：message\n        -  例：hello,everyone\n   - 提交任务：task.file:图片的URL  / task.crawl_image:豆瓣电影的id[?imageSize=n] 可以加请求参数\n        - 例1：task.file:https://img1.doubanio.com/view/movie_poster_cover/lpst/public/p2107289058.webp\n          下载完毕后会弹出一个框，输入想将其保存到的路径，比如E:/img.webp\n        - 例2：task.crawl_image:1292371?imageSize=2 \n          下载完毕后在弹出的框中输入E:/images.zip\n          \n- 假设用户输入都是符合格式的\n   \n- 尽可能提高程序的健壮性，对各种异常情况进行处理\n\n- 不得不承认的是，客户端做的很粗糙，主要开发目的还是练习Java的多线程和NIO\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsongxinjianqwe%2FChat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsongxinjianqwe%2FChat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsongxinjianqwe%2FChat/lists"}