Library:RakNet
| Developer | Jenkins Software / Oculus VR |
|---|---|
| Versions | 4.081 (protocol version 6) |
| License | BSD-3-Clause |
| Website | https://github.com/facebookarchive/RakNet |
| On this wiki | Facts · Code · Notes · Topics |
RakNet (Jenkins Software, then Oculus; BSD-3, last release 4.081 of 2014; continued as SLikeNet) is a C++ game networking engine over UDP reported in Minecraft Bedrock, SA-MP and Unity's legacy networking; identified by the 16-byte offline message ID and the one-byte message ids of MessageIdentifiers.h.
Overview
RakNet adds reliability, ordering channels, fragmentation, RPC, NAT punch-through, replication and voice plugins on top of UDP. Every payload starts with a one-byte message id (DefaultMessageIDTypes); game ids start at ID_USER_PACKET_ENUM (134). The fork SLikeNet (https://github.com/SLikeSoft/SLikeNet) continues it with the namespace SLNet instead of RakNet; the wire protocol is meant to stay compatible: SLikeNet's Source/include/slikenet/version.h (commit d5f775d789563a2d505e2afbf99a550d990bb49e) still has #define RAKNET_PROTOCOL_VERSION 6 (line 30), the same value as RakNet 4.081, next to SLIKENET_VERSION "0.1.3" and a backwards-compatibility RAKNET_VERSION "4.082" (lines 18 and 23).
Identifying it
- Unconnected (offline) packets contain the 16-byte magic
00 FF FF 00 FE FE FE FE FD FD FD FD 12 34 56 78(OFFLINE_MESSAGE_DATA_IDin Source/RakPeer.cpp). Its first byte is 0 so the high bit of the datagram header (isValid) is clear, which is how connected datagrams are told apart. - Offline layouts (from RakPeer.cpp, IsOfflineMessage around line 4580): ID_UNCONNECTED_PING (0x01) = id, 8-byte time, magic; ID_UNCONNECTED_PONG (0x1C) = id, time, 8-byte GUID, magic, data; the open-connection requests carry the magic right after the id (REQUEST_1 also holds the protocol version byte and padding to the MTU).
- Strings and symbols:
RakNet::RakPeerInterface,RakNetGUID,BitStream,RAKNET_VERSION "4.081"; RTTI names underRakNet::(orSLNet::).
Message ids
See the facts on this page.
Code & repositories
- https://github.com/facebookarchive/RakNet (BSD-3-Clause, archived).
- https://github.com/facebookarchive/RakNet @
1a169895a900c9fc4841c556e16514182b75faf8· license: BSD-3-Clause (declared by the contributor; GitHub's detector did not recognize LICENSE)
RakNet 4.081 source; MessageIdentifiers.h, RakPeer.cpp
Tested on: source read, not run: source read only · checked 2026-10-18; archived; last activity 2021-12-14