Segs icon indicating copy to clipboard operation
Segs copied to clipboard

Reorder MapEventTypes identifiers

Open nemerle opened this issue 7 years ago • 0 comments

Right now server->client, and client->server Commands ids are separated by their prefix number -> 100/200. The Event ids are not as neat. For example, we have evShortcutsRequest,2 which is client->server Event, but the actual request packet has opcode of 4, we have EntitiesResponse a server->client Event, which has opcode of 2 or 3, but the id of evEntitites,7.

Things to do

  • All server->client events should be grouped by setting their prefix number to 1000
  • All client->server events should be grouped by setting their prefix number to 1100
  • All events should have their ids correspond to packet opcodes
  • The 0 events in both groups should be used while sending/receiving the events to look them up by type, see the way the Command EmailRead::serializeto is using it's id to construct the packet opcode

nemerle avatar May 18 '18 21:05 nemerle