Skip to content

✨[后端] websocket消息协议改变 #16

Description

@fzdwx

Describe the effect you want to achieve

这是当前的消息

{
  "randomId": "d9c3cc4e9626d37f",
  "type": "chat",
  "id": "444444444444",
  "toId": "444444444444",
  "sessionType": "1",
  "fromUname": "fzdwx",
  "chatMessage": {
    "content": "qweqwe",
    "sendTime": "2022-04-27 20:10:18",
    "leftOrRight": "2",
    "contentType": 1
  }
}

之后

123{
  "randomId": "d9c3cc4e9626d37f",
  "id": "444444444444",
  "toId": "444444444444",
  "sessionType": "1",
  "fromUname": "fzdwx",
  "chatMessage": {
    "content": "qweqwe",
    "sendTime": "2022-04-27 20:10:18",
    "leftOrRight": "2",
    "contentType": 1
  }
}

Describe the solution you'd like
在解析为JSON之前先读取一个int,来表示类型。

这将为性能带来提升

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

  • Status
    In Progress

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions