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
24 changes: 0 additions & 24 deletions .classpath

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
/target
/.settings/*
logs/*
.classpath
.project
*.db
*.class
*.bak
29 changes: 0 additions & 29 deletions .project

This file was deleted.

40 changes: 32 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,35 @@
nettyPusher
===========

#a mobile android/ios pusher by netty
include

* socket connection keepalive
* java nio
* netty
* a custom binary protocol
###基础通信协议
简单的基础的自定义通信协议
+-------+----+-----+----------------+
bytes | 4 | 1 | 3 | ... |
+------+-----+-----+----------------+
packet | 长度 | 编码 | 保留 | 包体 |
+------+-----+-----+----------------+


###web分支

为区分报文类型在包体加上**4字节**,**因业务不同**,故放包体中

包体
+--------+----------------+
bytes | 4 | ... |
+--------+----------------+
packet | 报文类型| 报文内容 |
+--------+----------------+

* 实现简单的推送(android)
* 先用H2内存数据库做为开发环境
* 心跳处理


> android客户端详见 [android客户端](https://github.com/flatychen/nettyPusherAndroid)


###简单说明

- 开发环境使用嵌入式手动启动jetty,位于src/test/ startServer.java中
- cn.flaty包下的PushAdmin包与NettyPush包分别对应着连接管理与消息管理后台,以为后面分离做好准备;
- 由于管理与连接暂时没分离,故连接的启动使用spring监听器启动
Loading