# netty-chat
### Protocol:
| PacketLen | Header | Actual Content |
| :----: |:-------:| :-------------:|
| 4byte | 12byte | data |
### Packet:
- PacketLen
- HeaderLen
- Version
- Operation
- SeqId
- Body
### Architecture:
<img src="https://raw.githubusercontent.com/im-qq/netty-chat/master/docs/architecture.png" width="500">
<img src="https://raw.githubusercontent.com/im-qq/netty-chat/master/docs/proto.png" width="800">
### Operation
AuthOperation -> decode<AuthToken> -> AuthService
MessageOperation -> decode<Message> -> MessageService
### MessageQueue
MQMessage
MQProducer
MQConsumer
MQMessageListener
### Run
mvn install
logic: mvn spring-boot:run
comet: mvn spring-boot:run
### Test
Tcp: comet -> test -> ChatClient
WebSocket: comet -> test -> websocket -> demo.html
### License
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
没有合适的资源?快使用搜索试试~ 我知道了~
使用Netty实现IMServer,支持Tcp和WebSocket实现。_Java_下载.zip
共54个文件
java:32个
xml:7个
js:3个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 23 浏览量
2023-04-24
13:46:55
上传
评论
收藏 167KB ZIP 举报
温馨提示
使用Netty实现IMServer,支持Tcp和WebSocket实现。_Java_下载.zip
资源推荐
资源详情
资源评论
收起资源包目录
使用Netty实现IMServer,支持Tcp和WebSocket实现。_Java_下载.zip (54个子文件)
netty-chat-master
pom.xml 6KB
comet
pom.xml 3KB
src
test
java
wiki
tony
chat
comet
client
ChatClient.java 2KB
main
resources
dubbo.xsd 48KB
dubbo-consumer.xml 1KB
application.yml 364B
java
wiki
tony
chat
comet
initializer
TcpServerInitializer.java 717B
WebSocketServerInitializer.java 2KB
operation
AuthOperation.java 1KB
HeartbeatOperation.java 625B
MessageOperation.java 1014B
Operation.java 246B
AbstractOperation.java 703B
handler
ChatServerHandler.java 3KB
ChatServer.java 190B
exception
NotAuthException.java 196B
ChatException.java 299B
codec
TcpProtoCodec.java 2KB
WebSocketProtoCodec.java 2KB
server
TcpChatServer.java 2KB
WebSocketChatServer.java 2KB
ChatOperation.java 928B
ChatApplication.java 1KB
bean
Constants.java 250B
web
pom.xml 511B
docs
proto.png 93KB
architecture.png 40KB
pb
message.proto 528B
auth.proto 291B
README.md 129B
websocket
js
protobuf.min.js 52KB
bytebuffer.min.js 44KB
long.min.js 8KB
demo.html 5KB
base
pom.xml 1KB
src
main
java
wiki
tony
chat
base
service
MsgService.java 279B
AuthService.java 649B
pb
Message.java 51KB
Auth.java 25KB
exception
ConnectionAuthException.java 372B
bean
Message.java 756B
AuthToken.java 703B
Proto.java 2KB
Constants.java 385B
.gitignore 292B
logic
pom.xml 2KB
src
main
resources
dubbo-provider.xml 1KB
dubbo.xsd 48KB
application.yml 431B
java
wiki
tony
chat
logic
service
AuthServiceImpl.java 2KB
MsgServiceImpl.java 1KB
LogicApplication.java 1KB
config
CachingConfig.java 1KB
README.md 1KB
共 54 条
- 1
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9154
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功