Protocol.h 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. //
  2. // Copyright (c) 2008-2017 the Urho3D project.
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to deal
  6. // in the Software without restriction, including without limitation the rights
  7. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. // copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. // THE SOFTWARE.
  21. //
  22. #pragma once
  23. namespace Atomic
  24. {
  25. /// Client->server: send VariantMap of identity and authentication data.
  26. static const int MSG_IDENTITY = 0x5;
  27. /// Client->server: send controls (buttons and mouse movement.)
  28. static const int MSG_CONTROLS = 0x6;
  29. /// Client->server: scene has been loaded and client is ready to proceed.
  30. static const int MSG_SCENELOADED = 0x7;
  31. /// Client->server: request a package file.
  32. static const int MSG_REQUESTPACKAGE = 0x8;
  33. /// Server->client: package file data fragment.
  34. static const int MSG_PACKAGEDATA = 0x9;
  35. /// Server->client: load new scene. In case of empty filename the client should just empty the scene.
  36. static const int MSG_LOADSCENE = 0xa;
  37. /// Server->client: wrong scene checksum, can not participate.
  38. static const int MSG_SCENECHECKSUMERROR = 0xb;
  39. /// Server->client: create new node.
  40. static const int MSG_CREATENODE = 0xc;
  41. /// Server->client: node delta update.
  42. static const int MSG_NODEDELTAUPDATE = 0xd;
  43. /// Server->client: node latest data update.
  44. static const int MSG_NODELATESTDATA = 0xe;
  45. /// Server->client: remove node.
  46. static const int MSG_REMOVENODE = 0xf;
  47. /// Server->client: create new component.
  48. static const int MSG_CREATECOMPONENT = 0x10;
  49. /// Server->client: component delta update.
  50. static const int MSG_COMPONENTDELTAUPDATE = 0x11;
  51. /// Server->client: component latest data update.
  52. static const int MSG_COMPONENTLATESTDATA = 0x12;
  53. /// Server->client: remove component.
  54. static const int MSG_REMOVECOMPONENT = 0x13;
  55. /// Client->server and server->client: remote event.
  56. static const int MSG_REMOTEEVENT = 0x14;
  57. /// Client->server and server->client: remote node event.
  58. static const int MSG_REMOTENODEEVENT = 0x15;
  59. /// Server->client: info about package.
  60. static const int MSG_PACKAGEINFO = 0x16;
  61. // ATOMIC BEGIN
  62. // Server->client, Client->server: string message
  63. static const int MSG_STRING = 0x17;
  64. // ATOMIC END
  65. /// Fixed content ID for client controls update.
  66. static const unsigned CONTROLS_CONTENT_ID = 1;
  67. /// Package file fragment size.
  68. static const unsigned PACKAGE_FRAGMENT_SIZE = 1024;
  69. }