Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update json_protocol.md #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
26 changes: 13 additions & 13 deletions Server/json_protocol.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# json通信协议

## 注册用户
```
```json
client -> server:
{
"type": "register",
Expand All @@ -25,7 +25,7 @@ server -> client:
- 离线申请好友信息
- 离线申请加入群聊信息(所管理的群的)

```
```json
client -> server:
{
"type":"login",
Expand All @@ -42,7 +42,7 @@ server -> client:
```

## 建群
```
```json
client -> server:
{
"type": "creategroup",
Expand All @@ -59,7 +59,7 @@ server -> client:
```

## 加好友
```
```json
client -> server:
{
"type": "befriend",
Expand All @@ -84,7 +84,7 @@ server -> client: //朝申请对象发的

### 接受添加好友

```
```json
client -> server:
{
"type":"acceptfriend",
Expand Down Expand Up @@ -118,7 +118,7 @@ server -> client: (sender 那一方)

加入群聊的时候还要给在线群主发送申请

```
```json
client -> server:
{
"type": "join",
Expand Down Expand Up @@ -146,7 +146,7 @@ server -> client://朝对应群主发的

### 邀请好友入群

```
```json
client -> server:
{
"type":"invite",
Expand Down Expand Up @@ -174,7 +174,7 @@ server -> client: (被邀请人)

### (管理员)同意入群

```
```json
client -> server:
{
"type":"approveenter",
Expand Down Expand Up @@ -205,7 +205,7 @@ server -> client:

### (被邀请人)同意入群

```
```json
client -> server:
{
"type":"acceptinvite",
Expand All @@ -227,7 +227,7 @@ server -> client:

### 私聊信息

```
```json
client -> server:
{
"type":"sendfriend",
Expand All @@ -254,7 +254,7 @@ server -> client: (非当前client,接收信息)

### 群聊信息

```
```json
client -> server
{
"type":"sendgroup",
Expand Down Expand Up @@ -283,7 +283,7 @@ server -> client: (非当前client,接收信息)

### 删除好友

```
```json
client -> server
{
"type": "deletefriend",
Expand All @@ -301,7 +301,7 @@ server -> client

### 退出群聊

```
```json
client -> server
{
"type" : "quit"
Expand Down