Giter VIP home page Giter VIP logo

netty-chat's Introduction

netty-chat(v2.0)

基于Netty实现的WebSocket聊天室,实现的功能如下:
The WebSocket chat room based on Netty is implemented as follows:

  1. 支持登录
  2. 支持多人同时在线
  3. 同步显示在线人数
  4. 支持文字和表情的内容
  5. 浏览器与服务器保持长连接,定时心跳检测
  6. 支持群聊
  7. 支持单聊
  8. 支持接收离线消息
  9. 能无缝切换内存数组、rabbitmq、activemq、rocketmq四种不同方法来存储和转发聊天消息

快速开始/quick start:

服务端:

  1. 建立数据库nettychat,导入netty-chat\docs\sql\nettychat.sql文件入数据库
  2. 在文件netty-chat\src\main\resources\application.properties中修改数据库连接信息
  3. 运行包目录com.shuangyueliao.chat下的类HappyChatSpringBootMain的main方法 (默认用内存数组存放和转发聊天信息,如需切换使用中间件rabbitmq、activemq或rocketmq,则先启动相应的中间件,然后在类HappyChatSpringBootMain上关闭注解@EnableCustomChat,然后打开相应注释(rabbitmq对应注解@EnableRabbitmqChat、rocketmq对应@EnableRocketmqChat、activemq对应@EnableActivemqChat)

info

客户端:以浏览器方式打开docs目录下的index.html,登录的用户名和密码在数据库中 info

效果图

login
chat

netty-chat's People

Contributors

shuangyueliao avatar lighttrace avatar dependabot[bot] avatar

Stargazers

babyface1024 avatar  avatar lz-magic avatar  avatar  avatar John avatar LoseCoder avatar  avatar  avatar 一诚 avatar  avatar  avatar  avatar sengeiou avatar  avatar charmer avatar lanwangde avatar Aloe avatar  avatar fanjun avatar Mr-leigang avatar Carey Sipho avatar MR.Bean avatar  avatar tenglege avatar Jax avatar sK avatar manyi100 avatar  avatar  avatar DeveloperHu avatar banner avatar 牛大力 avatar  avatar  avatar  avatar yihango avatar weir avatar

Watchers

James Cloos avatar  avatar  avatar

netty-chat's Issues

问题请教

在线看了你的代码,还没有实际本地运行。对于已经离线的用户,你这边是用的方式:将消息发送到消息队列中。这里感觉还缺少点啥,发送到消息队列之后,如果用户后面重新在线了,咋处理呢,是消费消息队列里面到内容然后再重新推送么?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.