MessageIdentifiers.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  1. /*
  2. * Copyright (c) 2014, Oculus VR, Inc.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. *
  9. */
  10. /// \file
  11. /// \brief All the message identifiers used by RakNet. Message identifiers comprise the first byte of any message.
  12. ///
  13. #ifndef __MESSAGE_IDENTIFIERS_H
  14. #define __MESSAGE_IDENTIFIERS_H
  15. #if defined(RAKNET_USE_CUSTOM_PACKET_IDS)
  16. #include "CustomPacketIdentifiers.h"
  17. #else
  18. enum OutOfBandIdentifiers
  19. {
  20. ID_NAT_ESTABLISH_UNIDIRECTIONAL,
  21. ID_NAT_ESTABLISH_BIDIRECTIONAL,
  22. ID_NAT_TYPE_DETECT,
  23. ID_ROUTER_2_REPLY_TO_SENDER_PORT,
  24. ID_ROUTER_2_REPLY_TO_SPECIFIED_PORT,
  25. ID_ROUTER_2_MINI_PUNCH_REPLY,
  26. ID_ROUTER_2_MINI_PUNCH_REPLY_BOUNCE,
  27. ID_XBOX_360_VOICE,
  28. ID_XBOX_360_GET_NETWORK_ROOM,
  29. ID_XBOX_360_RETURN_NETWORK_ROOM,
  30. ID_NAT_PING,
  31. ID_NAT_PONG,
  32. };
  33. /// You should not edit the file MessageIdentifiers.h as it is a part of RakNet static library
  34. /// To define your own message id, define an enum following the code example that follows.
  35. ///
  36. /// \code
  37. /// enum {
  38. /// ID_MYPROJECT_MSG_1 = ID_USER_PACKET_ENUM,
  39. /// ID_MYPROJECT_MSG_2,
  40. /// ...
  41. /// };
  42. /// \endcode
  43. ///
  44. /// \note All these enumerations should be casted to (unsigned char) before writing them to RakNet::BitStream
  45. enum DefaultMessageIDTypes
  46. {
  47. //
  48. // RESERVED TYPES - DO NOT CHANGE THESE
  49. // All types from RakPeer
  50. //
  51. /// These types are never returned to the user.
  52. /// Ping from a connected system. Update timestamps (internal use only)
  53. ID_CONNECTED_PING,
  54. /// Ping from an unconnected system. Reply but do not update timestamps. (internal use only)
  55. ID_UNCONNECTED_PING,
  56. /// Ping from an unconnected system. Only reply if we have open connections. Do not update timestamps. (internal use only)
  57. ID_UNCONNECTED_PING_OPEN_CONNECTIONS,
  58. /// Pong from a connected system. Update timestamps (internal use only)
  59. ID_CONNECTED_PONG,
  60. /// A reliable packet to detect lost connections (internal use only)
  61. ID_DETECT_LOST_CONNECTIONS,
  62. /// C2S: Initial query: Header(1), OfflineMesageID(16), Protocol number(1), Pad(toMTU), sent with no fragment set.
  63. /// If protocol fails on server, returns ID_INCOMPATIBLE_PROTOCOL_VERSION to client
  64. ID_OPEN_CONNECTION_REQUEST_1,
  65. /// S2C: Header(1), OfflineMesageID(16), server GUID(8), HasSecurity(1), Cookie(4, if HasSecurity)
  66. /// , public key (if do security is true), MTU(2). If public key fails on client, returns ID_PUBLIC_KEY_MISMATCH
  67. ID_OPEN_CONNECTION_REPLY_1,
  68. /// C2S: Header(1), OfflineMesageID(16), Cookie(4, if HasSecurity is true on the server), clientSupportsSecurity(1 bit),
  69. /// handshakeChallenge (if has security on both server and client), remoteBindingAddress(6), MTU(2), client GUID(8)
  70. /// Connection slot allocated if cookie is valid, server is not full, GUID and IP not already in use.
  71. ID_OPEN_CONNECTION_REQUEST_2,
  72. /// S2C: Header(1), OfflineMesageID(16), server GUID(8), mtu(2), doSecurity(1 bit), handshakeAnswer (if do security is true)
  73. ID_OPEN_CONNECTION_REPLY_2,
  74. /// C2S: Header(1), GUID(8), Timestamp, HasSecurity(1), Proof(32)
  75. ID_CONNECTION_REQUEST,
  76. /// RakPeer - Remote system requires secure connections, pass a public key to RakPeerInterface::Connect()
  77. ID_REMOTE_SYSTEM_REQUIRES_PUBLIC_KEY,
  78. /// RakPeer - We passed a public key to RakPeerInterface::Connect(), but the other system did not have security turned on
  79. ID_OUR_SYSTEM_REQUIRES_SECURITY,
  80. /// RakPeer - Wrong public key passed to RakPeerInterface::Connect()
  81. ID_PUBLIC_KEY_MISMATCH,
  82. /// RakPeer - Same as ID_ADVERTISE_SYSTEM, but intended for internal use rather than being passed to the user.
  83. /// Second byte indicates type. Used currently for NAT punchthrough for receiver port advertisement. See ID_NAT_ADVERTISE_RECIPIENT_PORT
  84. ID_OUT_OF_BAND_INTERNAL,
  85. /// If RakPeerInterface::Send() is called where PacketReliability contains _WITH_ACK_RECEIPT, then on a later call to
  86. /// RakPeerInterface::Receive() you will get ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS. The message will be 5 bytes long,
  87. /// and bytes 1-4 inclusive will contain a number in native order containing a number that identifies this message.
  88. /// This number will be returned by RakPeerInterface::Send() or RakPeerInterface::SendList(). ID_SND_RECEIPT_ACKED means that
  89. /// the message arrived
  90. ID_SND_RECEIPT_ACKED,
  91. /// If RakPeerInterface::Send() is called where PacketReliability contains UNRELIABLE_WITH_ACK_RECEIPT, then on a later call to
  92. /// RakPeerInterface::Receive() you will get ID_SND_RECEIPT_ACKED or ID_SND_RECEIPT_LOSS. The message will be 5 bytes long,
  93. /// and bytes 1-4 inclusive will contain a number in native order containing a number that identifies this message. This number
  94. /// will be returned by RakPeerInterface::Send() or RakPeerInterface::SendList(). ID_SND_RECEIPT_LOSS means that an ack for the
  95. /// message did not arrive (it may or may not have been delivered, probably not). On disconnect or shutdown, you will not get
  96. /// ID_SND_RECEIPT_LOSS for unsent messages, you should consider those messages as all lost.
  97. ID_SND_RECEIPT_LOSS,
  98. //
  99. // USER TYPES - DO NOT CHANGE THESE
  100. //
  101. /// RakPeer - In a client/server environment, our connection request to the server has been accepted.
  102. ID_CONNECTION_REQUEST_ACCEPTED,
  103. /// RakPeer - Sent to the player when a connection request cannot be completed due to inability to connect.
  104. ID_CONNECTION_ATTEMPT_FAILED,
  105. /// RakPeer - Sent a connect request to a system we are currently connected to.
  106. ID_ALREADY_CONNECTED,
  107. /// RakPeer - A remote system has successfully connected.
  108. ID_NEW_INCOMING_CONNECTION,
  109. /// RakPeer - The system we attempted to connect to is not accepting new connections.
  110. ID_NO_FREE_INCOMING_CONNECTIONS,
  111. /// RakPeer - The system specified in Packet::systemAddress has disconnected from us. For the client, this would mean the
  112. /// server has shutdown.
  113. ID_DISCONNECTION_NOTIFICATION,
  114. /// RakPeer - Reliable packets cannot be delivered to the system specified in Packet::systemAddress. The connection to that
  115. /// system has been closed.
  116. ID_CONNECTION_LOST,
  117. /// RakPeer - We are banned from the system we attempted to connect to.
  118. ID_CONNECTION_BANNED,
  119. /// RakPeer - The remote system is using a password and has refused our connection because we did not set the correct password.
  120. ID_INVALID_PASSWORD,
  121. // RAKNET_PROTOCOL_VERSION in RakNetVersion.h does not match on the remote system what we have on our system
  122. // This means the two systems cannot communicate.
  123. // The 2nd byte of the message contains the value of RAKNET_PROTOCOL_VERSION for the remote system
  124. ID_INCOMPATIBLE_PROTOCOL_VERSION,
  125. // Means that this IP address connected recently, and can't connect again as a security measure. See
  126. /// RakPeer::SetLimitIPConnectionFrequency()
  127. ID_IP_RECENTLY_CONNECTED,
  128. /// RakPeer - The sizeof(RakNetTime) bytes following this byte represent a value which is automatically modified by the difference
  129. /// in system times between the sender and the recipient. Requires that you call SetOccasionalPing.
  130. ID_TIMESTAMP,
  131. /// RakPeer - Pong from an unconnected system. First byte is ID_UNCONNECTED_PONG, second sizeof(RakNet::TimeMS) bytes is the ping,
  132. /// following bytes is system specific enumeration data.
  133. /// Read using bitstreams
  134. ID_UNCONNECTED_PONG,
  135. /// RakPeer - Inform a remote system of our IP/Port. On the recipient, all data past ID_ADVERTISE_SYSTEM is whatever was passed to
  136. /// the data parameter
  137. ID_ADVERTISE_SYSTEM,
  138. // RakPeer - Downloading a large message. Format is ID_DOWNLOAD_PROGRESS (MessageID), partCount (unsigned int),
  139. /// partTotal (unsigned int),
  140. /// partLength (unsigned int), first part data (length <= MAX_MTU_SIZE). See the three parameters partCount, partTotal
  141. /// and partLength in OnFileProgress in FileListTransferCBInterface.h
  142. ID_DOWNLOAD_PROGRESS,
  143. /// ConnectionGraph2 plugin - In a client/server environment, a client other than ourselves has disconnected gracefully.
  144. /// Packet::systemAddress is modified to reflect the systemAddress of this client.
  145. ID_REMOTE_DISCONNECTION_NOTIFICATION,
  146. /// ConnectionGraph2 plugin - In a client/server environment, a client other than ourselves has been forcefully dropped.
  147. /// Packet::systemAddress is modified to reflect the systemAddress of this client.
  148. ID_REMOTE_CONNECTION_LOST,
  149. /// ConnectionGraph2 plugin: Bytes 1-4 = count. for (count items) contains {SystemAddress, RakNetGUID, 2 byte ping}
  150. ID_REMOTE_NEW_INCOMING_CONNECTION,
  151. /// FileListTransfer plugin - Setup data
  152. ID_FILE_LIST_TRANSFER_HEADER,
  153. /// FileListTransfer plugin - A file
  154. ID_FILE_LIST_TRANSFER_FILE,
  155. // Ack for reference push, to send more of the file
  156. ID_FILE_LIST_REFERENCE_PUSH_ACK,
  157. /// DirectoryDeltaTransfer plugin - Request from a remote system for a download of a directory
  158. ID_DDT_DOWNLOAD_REQUEST,
  159. /// RakNetTransport plugin - Transport provider message, used for remote console
  160. ID_TRANSPORT_STRING,
  161. /// ReplicaManager plugin - Create an object
  162. ID_REPLICA_MANAGER_CONSTRUCTION,
  163. /// ReplicaManager plugin - Changed scope of an object
  164. ID_REPLICA_MANAGER_SCOPE_CHANGE,
  165. /// ReplicaManager plugin - Serialized data of an object
  166. ID_REPLICA_MANAGER_SERIALIZE,
  167. /// ReplicaManager plugin - New connection, about to send all world objects
  168. ID_REPLICA_MANAGER_DOWNLOAD_STARTED,
  169. /// ReplicaManager plugin - Finished downloading all serialized objects
  170. ID_REPLICA_MANAGER_DOWNLOAD_COMPLETE,
  171. /// RakVoice plugin - Open a communication channel
  172. ID_RAKVOICE_OPEN_CHANNEL_REQUEST,
  173. /// RakVoice plugin - Communication channel accepted
  174. ID_RAKVOICE_OPEN_CHANNEL_REPLY,
  175. /// RakVoice plugin - Close a communication channel
  176. ID_RAKVOICE_CLOSE_CHANNEL,
  177. /// RakVoice plugin - Voice data
  178. ID_RAKVOICE_DATA,
  179. /// Autopatcher plugin - Get a list of files that have changed since a certain date
  180. ID_AUTOPATCHER_GET_CHANGELIST_SINCE_DATE,
  181. /// Autopatcher plugin - A list of files to create
  182. ID_AUTOPATCHER_CREATION_LIST,
  183. /// Autopatcher plugin - A list of files to delete
  184. ID_AUTOPATCHER_DELETION_LIST,
  185. /// Autopatcher plugin - A list of files to get patches for
  186. ID_AUTOPATCHER_GET_PATCH,
  187. /// Autopatcher plugin - A list of patches for a list of files
  188. ID_AUTOPATCHER_PATCH_LIST,
  189. /// Autopatcher plugin - Returned to the user: An error from the database repository for the autopatcher.
  190. ID_AUTOPATCHER_REPOSITORY_FATAL_ERROR,
  191. /// Autopatcher plugin - Returned to the user: The server does not allow downloading unmodified game files.
  192. ID_AUTOPATCHER_CANNOT_DOWNLOAD_ORIGINAL_UNMODIFIED_FILES,
  193. /// Autopatcher plugin - Finished getting all files from the autopatcher
  194. ID_AUTOPATCHER_FINISHED_INTERNAL,
  195. ID_AUTOPATCHER_FINISHED,
  196. /// Autopatcher plugin - Returned to the user: You must restart the application to finish patching.
  197. ID_AUTOPATCHER_RESTART_APPLICATION,
  198. /// NATPunchthrough plugin: internal
  199. ID_NAT_PUNCHTHROUGH_REQUEST,
  200. /// NATPunchthrough plugin: internal
  201. //ID_NAT_GROUP_PUNCHTHROUGH_REQUEST,
  202. /// NATPunchthrough plugin: internal
  203. //ID_NAT_GROUP_PUNCHTHROUGH_REPLY,
  204. /// NATPunchthrough plugin: internal
  205. ID_NAT_CONNECT_AT_TIME,
  206. /// NATPunchthrough plugin: internal
  207. ID_NAT_GET_MOST_RECENT_PORT,
  208. /// NATPunchthrough plugin: internal
  209. ID_NAT_CLIENT_READY,
  210. /// NATPunchthrough plugin: internal
  211. //ID_NAT_GROUP_PUNCHTHROUGH_FAILURE_NOTIFICATION,
  212. /// NATPunchthrough plugin: Destination system is not connected to the server. Bytes starting at offset 1 contains the
  213. /// RakNetGUID destination field of NatPunchthroughClient::OpenNAT().
  214. ID_NAT_TARGET_NOT_CONNECTED,
  215. /// NATPunchthrough plugin: Destination system is not responding to ID_NAT_GET_MOST_RECENT_PORT. Possibly the plugin is not installed.
  216. /// Bytes starting at offset 1 contains the RakNetGUID destination field of NatPunchthroughClient::OpenNAT().
  217. ID_NAT_TARGET_UNRESPONSIVE,
  218. /// NATPunchthrough plugin: The server lost the connection to the destination system while setting up punchthrough.
  219. /// Possibly the plugin is not installed. Bytes starting at offset 1 contains the RakNetGUID destination
  220. /// field of NatPunchthroughClient::OpenNAT().
  221. ID_NAT_CONNECTION_TO_TARGET_LOST,
  222. /// NATPunchthrough plugin: This punchthrough is already in progress. Possibly the plugin is not installed.
  223. /// Bytes starting at offset 1 contains the RakNetGUID destination field of NatPunchthroughClient::OpenNAT().
  224. ID_NAT_ALREADY_IN_PROGRESS,
  225. /// NATPunchthrough plugin: This message is generated on the local system, and does not come from the network.
  226. /// packet::guid contains the destination field of NatPunchthroughClient::OpenNAT(). Byte 1 contains 1 if you are the sender, 0 if not
  227. ID_NAT_PUNCHTHROUGH_FAILED,
  228. /// NATPunchthrough plugin: Punchthrough succeeded. See packet::systemAddress and packet::guid. Byte 1 contains 1 if you are the sender,
  229. /// 0 if not. You can now use RakPeer::Connect() or other calls to communicate with this system.
  230. ID_NAT_PUNCHTHROUGH_SUCCEEDED,
  231. /// ReadyEvent plugin - Set the ready state for a particular system
  232. /// First 4 bytes after the message contains the id
  233. ID_READY_EVENT_SET,
  234. /// ReadyEvent plugin - Unset the ready state for a particular system
  235. /// First 4 bytes after the message contains the id
  236. ID_READY_EVENT_UNSET,
  237. /// All systems are in state ID_READY_EVENT_SET
  238. /// First 4 bytes after the message contains the id
  239. ID_READY_EVENT_ALL_SET,
  240. /// \internal, do not process in your game
  241. /// ReadyEvent plugin - Request of ready event state - used for pulling data when newly connecting
  242. ID_READY_EVENT_QUERY,
  243. /// Lobby packets. Second byte indicates type.
  244. ID_LOBBY_GENERAL,
  245. // RPC3, RPC4 error
  246. ID_RPC_REMOTE_ERROR,
  247. /// Plugin based replacement for RPC system
  248. ID_RPC_PLUGIN,
  249. /// FileListTransfer transferring large files in chunks that are read only when needed, to save memory
  250. ID_FILE_LIST_REFERENCE_PUSH,
  251. /// Force the ready event to all set
  252. ID_READY_EVENT_FORCE_ALL_SET,
  253. /// Rooms function
  254. ID_ROOMS_EXECUTE_FUNC,
  255. ID_ROOMS_LOGON_STATUS,
  256. ID_ROOMS_HANDLE_CHANGE,
  257. /// Lobby2 message
  258. ID_LOBBY2_SEND_MESSAGE,
  259. ID_LOBBY2_SERVER_ERROR,
  260. /// Informs user of a new host GUID. Packet::Guid contains this new host RakNetGuid. The old host can be read out using BitStream->Read(RakNetGuid) starting on byte 1
  261. /// This is not returned until connected to a remote system
  262. /// If the oldHost is UNASSIGNED_RAKNET_GUID, then this is the first time the host has been determined
  263. ID_FCM2_NEW_HOST,
  264. /// \internal For FullyConnectedMesh2 plugin
  265. ID_FCM2_REQUEST_FCMGUID,
  266. /// \internal For FullyConnectedMesh2 plugin
  267. ID_FCM2_RESPOND_CONNECTION_COUNT,
  268. /// \internal For FullyConnectedMesh2 plugin
  269. ID_FCM2_INFORM_FCMGUID,
  270. /// \internal For FullyConnectedMesh2 plugin
  271. ID_FCM2_UPDATE_MIN_TOTAL_CONNECTION_COUNT,
  272. /// A remote system (not necessarily the host) called FullyConnectedMesh2::StartVerifiedJoin() with our system as the client
  273. /// Use FullyConnectedMesh2::GetVerifiedJoinRequiredProcessingList() to read systems
  274. /// For each system, attempt NatPunchthroughClient::OpenNAT() and/or RakPeerInterface::Connect()
  275. /// When this has been done for all systems, the remote system will automatically be informed of the results
  276. /// \note Only the designated client gets this message
  277. /// \note You won't get this message if you are already connected to all target systems
  278. /// \note If you fail to connect to a system, this does not automatically mean you will get ID_FCM2_VERIFIED_JOIN_FAILED as that system may have been shutting down from the host too
  279. /// \sa FullyConnectedMesh2::StartVerifiedJoin()
  280. ID_FCM2_VERIFIED_JOIN_START,
  281. /// \internal The client has completed processing for all systems designated in ID_FCM2_VERIFIED_JOIN_START
  282. ID_FCM2_VERIFIED_JOIN_CAPABLE,
  283. /// Client failed to connect to a required systems notified via FullyConnectedMesh2::StartVerifiedJoin()
  284. /// RakPeerInterface::CloseConnection() was automatically called for all systems connected due to ID_FCM2_VERIFIED_JOIN_START
  285. /// Programmer should inform the player via the UI that they cannot join this session, and to choose a different session
  286. /// \note Server normally sends us this message, however if connection to the server was lost, message will be returned locally
  287. /// \note Only the designated client gets this message
  288. ID_FCM2_VERIFIED_JOIN_FAILED,
  289. /// The system that called StartVerifiedJoin() got ID_FCM2_VERIFIED_JOIN_CAPABLE from the client and then called RespondOnVerifiedJoinCapable() with true
  290. /// AddParticipant() has automatically been called for this system
  291. /// Use GetVerifiedJoinAcceptedAdditionalData() to read any additional data passed to RespondOnVerifiedJoinCapable()
  292. /// \note All systems in the mesh get this message
  293. /// \sa RespondOnVerifiedJoinCapable()
  294. ID_FCM2_VERIFIED_JOIN_ACCEPTED,
  295. /// The system that called StartVerifiedJoin() got ID_FCM2_VERIFIED_JOIN_CAPABLE from the client and then called RespondOnVerifiedJoinCapable() with false
  296. /// CloseConnection() has been automatically called for each system connected to since ID_FCM2_VERIFIED_JOIN_START.
  297. /// The connection is NOT automatically closed to the original host that sent StartVerifiedJoin()
  298. /// Use GetVerifiedJoinRejectedAdditionalData() to read any additional data passed to RespondOnVerifiedJoinCapable()
  299. /// \note Only the designated client gets this message
  300. /// \sa RespondOnVerifiedJoinCapable()
  301. ID_FCM2_VERIFIED_JOIN_REJECTED,
  302. /// UDP proxy messages. Second byte indicates type.
  303. ID_UDP_PROXY_GENERAL,
  304. /// SQLite3Plugin - execute
  305. ID_SQLite3_EXEC,
  306. /// SQLite3Plugin - Remote database is unknown
  307. ID_SQLite3_UNKNOWN_DB,
  308. /// Events happening with SQLiteClientLoggerPlugin
  309. ID_SQLLITE_LOGGER,
  310. /// Sent to NatTypeDetectionServer
  311. ID_NAT_TYPE_DETECTION_REQUEST,
  312. /// Sent to NatTypeDetectionClient. Byte 1 contains the type of NAT detected.
  313. ID_NAT_TYPE_DETECTION_RESULT,
  314. /// Used by the router2 plugin
  315. ID_ROUTER_2_INTERNAL,
  316. /// No path is available or can be established to the remote system
  317. /// Packet::guid contains the endpoint guid that we were trying to reach
  318. ID_ROUTER_2_FORWARDING_NO_PATH,
  319. /// \brief You can now call connect, ping, or other operations to the destination system.
  320. ///
  321. /// Connect as follows:
  322. ///
  323. /// RakNet::BitStream bs(packet->data, packet->length, false);
  324. /// bs.IgnoreBytes(sizeof(MessageID));
  325. /// RakNetGUID endpointGuid;
  326. /// bs.Read(endpointGuid);
  327. /// unsigned short sourceToDestPort;
  328. /// bs.Read(sourceToDestPort);
  329. /// char ipAddressString[32];
  330. /// packet->systemAddress.ToString(false, ipAddressString);
  331. /// rakPeerInterface->Connect(ipAddressString, sourceToDestPort, 0,0);
  332. ID_ROUTER_2_FORWARDING_ESTABLISHED,
  333. /// The IP address for a forwarded connection has changed
  334. /// Read endpointGuid and port as per ID_ROUTER_2_FORWARDING_ESTABLISHED
  335. ID_ROUTER_2_REROUTED,
  336. /// \internal Used by the team balancer plugin
  337. ID_TEAM_BALANCER_INTERNAL,
  338. /// Cannot switch to the desired team because it is full. However, if someone on that team leaves, you will
  339. /// get ID_TEAM_BALANCER_TEAM_ASSIGNED later.
  340. /// For TeamBalancer: Byte 1 contains the team you requested to join. Following bytes contain NetworkID of which member
  341. ID_TEAM_BALANCER_REQUESTED_TEAM_FULL,
  342. /// Cannot switch to the desired team because all teams are locked. However, if someone on that team leaves,
  343. /// you will get ID_TEAM_BALANCER_SET_TEAM later.
  344. /// For TeamBalancer: Byte 1 contains the team you requested to join.
  345. ID_TEAM_BALANCER_REQUESTED_TEAM_LOCKED,
  346. ID_TEAM_BALANCER_TEAM_REQUESTED_CANCELLED,
  347. /// Team balancer plugin informing you of your team. Byte 1 contains the team you requested to join. Following bytes contain NetworkID of which member.
  348. ID_TEAM_BALANCER_TEAM_ASSIGNED,
  349. /// Gamebryo Lightspeed integration
  350. ID_LIGHTSPEED_INTEGRATION,
  351. /// XBOX integration
  352. ID_XBOX_LOBBY,
  353. /// The password we used to challenge the other system passed, meaning the other system has called TwoWayAuthentication::AddPassword() with the same password we passed to TwoWayAuthentication::Challenge()
  354. /// You can read the identifier used to challenge as follows:
  355. /// RakNet::BitStream bs(packet->data, packet->length, false); bs.IgnoreBytes(sizeof(RakNet::MessageID)); RakNet::RakString password; bs.Read(password);
  356. ID_TWO_WAY_AUTHENTICATION_INCOMING_CHALLENGE_SUCCESS,
  357. ID_TWO_WAY_AUTHENTICATION_OUTGOING_CHALLENGE_SUCCESS,
  358. /// A remote system sent us a challenge using TwoWayAuthentication::Challenge(), and the challenge failed.
  359. /// If the other system must pass the challenge to stay connected, you should call RakPeer::CloseConnection() to terminate the connection to the other system.
  360. ID_TWO_WAY_AUTHENTICATION_INCOMING_CHALLENGE_FAILURE,
  361. /// The other system did not add the password we used to TwoWayAuthentication::AddPassword()
  362. /// You can read the identifier used to challenge as follows:
  363. /// RakNet::BitStream bs(packet->data, packet->length, false); bs.IgnoreBytes(sizeof(MessageID)); RakNet::RakString password; bs.Read(password);
  364. ID_TWO_WAY_AUTHENTICATION_OUTGOING_CHALLENGE_FAILURE,
  365. /// The other system did not respond within a timeout threshhold. Either the other system is not running the plugin or the other system was blocking on some operation for a long time.
  366. /// You can read the identifier used to challenge as follows:
  367. /// RakNet::BitStream bs(packet->data, packet->length, false); bs.IgnoreBytes(sizeof(MessageID)); RakNet::RakString password; bs.Read(password);
  368. ID_TWO_WAY_AUTHENTICATION_OUTGOING_CHALLENGE_TIMEOUT,
  369. /// \internal
  370. ID_TWO_WAY_AUTHENTICATION_NEGOTIATION,
  371. /// CloudClient / CloudServer
  372. ID_CLOUD_POST_REQUEST,
  373. ID_CLOUD_RELEASE_REQUEST,
  374. ID_CLOUD_GET_REQUEST,
  375. ID_CLOUD_GET_RESPONSE,
  376. ID_CLOUD_UNSUBSCRIBE_REQUEST,
  377. ID_CLOUD_SERVER_TO_SERVER_COMMAND,
  378. ID_CLOUD_SUBSCRIPTION_NOTIFICATION,
  379. // LibVoice
  380. ID_LIB_VOICE,
  381. ID_RELAY_PLUGIN,
  382. ID_NAT_REQUEST_BOUND_ADDRESSES,
  383. ID_NAT_RESPOND_BOUND_ADDRESSES,
  384. ID_FCM2_UPDATE_USER_CONTEXT,
  385. ID_RESERVED_3,
  386. ID_RESERVED_4,
  387. ID_RESERVED_5,
  388. ID_RESERVED_6,
  389. ID_RESERVED_7,
  390. ID_RESERVED_8,
  391. ID_RESERVED_9,
  392. // For the user to use. Start your first enumeration at this value.
  393. ID_USER_PACKET_ENUM
  394. //-------------------------------------------------------------------------------------------------------------
  395. };
  396. #endif // RAKNET_USE_CUSTOM_PACKET_IDS
  397. #endif
粤ICP备19079148号