Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 1 addition & 130 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,130 +1 @@
# InChat(当前版本1.6.0)

### [在线咨询与留言](https://gitter.im/In-Chat/Lobby)

> 当前主要更新分支,master将会再所有分支开放一定阶段后整改为maven包,提供给大家使用

> 每周六日下午更新项目或分支,项目尚未结束,欢迎加入与提供建议

## 分支介绍 im-api

腾讯IM(云通信)后端模仿项目,均以API形式对接,如果有前端想要对接的可以运行本分支,本分支预计终版为一个单服务并发30万用户的IM后台项目

## 分支介绍 paho-mqtt

基于小程序端或移动web端的paho.js与[java MQTT 客户端模拟](https://github.com/eclipse/paho.mqtt.java)的消息订阅与通信,小程序Iot的Demo,目前支持ws格式

## 分支介绍 tcp-wechat

基于小程序端与单片机等硬件的TCP/IP的主要通信,Iot中心作为中转,本demo将完全实现具体功能,详情请看分支主页

## 简介

***(InChat)Iot Netty Chat***

仿微信聊天应用,一步一步更新,基于SpringBoot-WebSocket通用框架,结合Netty进行聊天社交,并记录聊天日志,
异步存储,前端暂用SUI Mobile,添加实现TCP/IP后端通信端口(MQTT协议、可实时与单片机等TCP硬件通信)、加入图片处理流,
聊天实现文字与图片发送功能、API调用Netty长链接执行发送消息(在线数、用户列表)

## 基本架构图(1.5.2版)

![Image text](https://raw.githubusercontent.com/UncleCatMySelf/img-myself/master/img/nettychat/ggg1.png)

## 功能

>实时聊天
>异步CRUD处理消息日志
>获取聊天历史
>用户登录、记录登录用户聊天历史
>防止二次登录
>SUI Mobile仿微信样式
>TCP/IP软硬件通信(8092)
>MQTT协议下的Iot物联网通信(8094)
>图片发送聊天功能
>API调用Netty长链接执行发送消息(在线用户数、用户列表)
>下版(1.7.0):好友功能等

## 版本迭代介绍

* 1.0.0版本

用户登录,聊天历史,随机用户名,异步数据写入:https://segmentfault.com/a/1190000016615063

* 1.2.0版本

修复聊天记录功能,实现重复信息录入,完善前端页面,回车监听等:https://segmentfault.com/a/1190000016637814

* 1.3.0版本

用户注册登录功能,系统聊天绑定用户,禁止二次登录等,前端页面大改

* 1.4.1版本

本人主导SUI Mobile构建仿微信样式页面版,使用时开F12手机界面

* 1.5.2版本

TCP/IP软硬件通信-单片机等应用的TCP通信,Netty处理二进制图片发送聊天功能

* 1.5.8版本

MQTT协议软硬件通信等,Iot物联网

* 1.6.0版本

API调用Netty长链接执行发送消息(在线数、用户列表):https://segmentfault.com/a/1190000016603392


## 配置

>application.yml 数据库配置、Netty参数配置

>TCP需先去com.myself.nettychat.tcptest包下执行CRC16myself获取发送数据,

>再执行TCPTestClient发送数据,请勿随意更改发送格式(通信协议来的)

>http://localhost:8080/susu/admin/loginsui 启动访问路径

>mqtt协议测试在mqttclient包下

>http://localhost:8080/susu/swagger-ui.html 查看API文档

## 效果图

![Image text](https://raw.githubusercontent.com/UncleCatMySelf/img-myself/master/img/nettychat/001%20(5).png)
![Image text](https://raw.githubusercontent.com/UncleCatMySelf/img-myself/master/img/nettychat/001%20(3).png)
![Image text](https://raw.githubusercontent.com/UncleCatMySelf/img-myself/master/img/nettychat/001%20(4).png)
![Image text](https://raw.githubusercontent.com/UncleCatMySelf/img-myself/master/img/nettychat/001%20(2).png)
![Image text](https://raw.githubusercontent.com/UncleCatMySelf/img-myself/master/img/nettychat/001%20(1).png)
![Image text](https://raw.githubusercontent.com/UncleCatMySelf/img-myself/master/img/nettychat/9.png)
![Image text](https://raw.githubusercontent.com/UncleCatMySelf/img-myself/master/img/nettychat/10.png)
![Image text](https://raw.githubusercontent.com/UncleCatMySelf/img-myself/master/img/nettychat/11.png)

## 预留BUG

```
io.netty.handler.codec.CorruptedFrameException: Max frame length of 65536 has been exceeded.
图片过大,需要在前端做图片上传压缩

Uncaught TypeError: msg.substring is not a function at WebSocket.socket.onmessage (newChat.js:38)
前端代码的一点问题,不影响项目正常运行

java.io.IOException: 远程主机强迫关闭了一个现有的连接。
TCP客户端连接主动关闭,不影响,良性报错
```

## 下载地址

下载地址:https://github.com/UncleCatMySelf/SBToNettyChat/releases

## 交流与提问

提问与Bug上报:https://github.com/UncleCatMySelf/SBToNettyChat/issues

QQ群:628793702(仅供交流,不提供问题解答)

## 关于作者

个人公众号:UncleCatMySelf

![Image text](https://raw.githubusercontent.com/UncleCatMySelf/img-myself/master/img/%E5%85%AC%E4%BC%97%E5%8F%B7.png)
> 正在构建中。
105 changes: 0 additions & 105 deletions h5/chat.html

This file was deleted.

47 changes: 0 additions & 47 deletions h5/home.html

This file was deleted.

67 changes: 0 additions & 67 deletions h5/index.html

This file was deleted.

Binary file removed h5/logoSmall.png
Binary file not shown.
Loading