Protocol.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. // Copyright (c) 2008-2023 the Urho3D project
  2. // License: MIT
  3. #pragma once
  4. namespace Urho3D
  5. {
  6. /// Client->server: send VariantMap of identity and authentication data.
  7. static const int MSG_IDENTITY = 0x87;
  8. /// Client->server: send controls (buttons and mouse movement).
  9. static const int MSG_CONTROLS = 0x88;
  10. /// Client->server: scene has been loaded and client is ready to proceed.
  11. static const int MSG_SCENELOADED = 0x89;
  12. /// Client->server: request a package file.
  13. static const int MSG_REQUESTPACKAGE = 0x8A;
  14. /// Server->client: package file data fragment.
  15. static const int MSG_PACKAGEDATA = 0x8B;
  16. /// Server->client: load new scene. In case of empty filename the client should just empty the scene.
  17. static const int MSG_LOADSCENE = 0x8C;
  18. /// Server->client: wrong scene checksum, can not participate.
  19. static const int MSG_SCENECHECKSUMERROR = 0x8D;
  20. /// Server->client: create new node.
  21. static const int MSG_CREATENODE = 0x8E;
  22. /// Server->client: node delta update.
  23. static const int MSG_NODEDELTAUPDATE = 0x8F;
  24. /// Server->client: node latest data update.
  25. static const int MSG_NODELATESTDATA = 0x90;
  26. /// Server->client: remove node.
  27. static const int MSG_REMOVENODE = 0x91;
  28. /// Server->client: create new component.
  29. static const int MSG_CREATECOMPONENT = 0x92;
  30. /// Server->client: component delta update.
  31. static const int MSG_COMPONENTDELTAUPDATE = 0x93;
  32. /// Server->client: component latest data update.
  33. static const int MSG_COMPONENTLATESTDATA = 0x94;
  34. /// Server->client: remove component.
  35. static const int MSG_REMOVECOMPONENT = 0x95;
  36. /// Client->server and server->client: remote event.
  37. static const int MSG_REMOTEEVENT = 0x96;
  38. /// Client->server and server->client: remote node event.
  39. static const int MSG_REMOTENODEEVENT = 0x97;
  40. /// Server->client: info about package.
  41. static const int MSG_PACKAGEINFO = 0x98;
  42. /// Packet that includes all the above messages
  43. static const int MSG_PACKED_MESSAGE = 0x99;
  44. /// Used to define custom messages, usually of the form MSG_USER + x, where x is an integer value.
  45. static const int MSG_USER = 0x200;
  46. /// Fixed content ID for client controls update.
  47. static const unsigned CONTROLS_CONTENT_ID = 1;
  48. /// Package file fragment size.
  49. static const unsigned PACKAGE_FRAGMENT_SIZE = 1024;
  50. }