Protocol.h 3.1 KB

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