The UE5 client shares the sameDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/kenzz55/ue5-iocp-mmo-server/llms.txt
Use this file to discover all available pages before exploring further.
Packet.proto definition as the C++ GameServer. The generated C++ files live in MMOClient1/Source/MMOClient1/Proto/ — Packet.pb.h, Packet.pb.cpp, and the UE-specific Packet.pb.ue.h wrapper. All gameplay packets are serialized with Protocol Buffers v3 and framed with the 4-byte PacketHeader (2-byte size + 2-byte packet ID) described in the Packet Protocol reference.
The client proto file (
MMOClient1/Source/MMOClient1/Proto/Packet.proto) and the server proto file (ServerSolution/ServerSolution/Proto/Packet.proto) must always be identical. If you change one, regenerate and update both.Packets Sent by the Client
These areC_ (client-to-server) messages. Most travel over TCP; C_MoveReq and C_UdpHelloReq use the UDP channel.
C_EnterGameReq — 0x0201
Sent over TCP immediately after the TCP connection is established. The enter_token is the short-lived token received from the AuthServer’s /auth/select-server response.
Short-lived enter token issued by the AuthServer. Valid for
EnterTokenSeconds (default 60 seconds).Character ID returned by
/auth/select-server in SelectServerResponse.CharacterId.C_UdpHelloReq — 0x0204
Sent over UDP to register the client’s UDP endpoint with the server after S_EnterGameRes is received.
Token returned in
S_EnterGameRes.udp_token for binding the UDP endpoint.Account ID from
S_EnterGameRes.account_id.Character ID from
S_EnterGameRes.character_id.C_MoveReq — 0x0211
Sent over UDP at the movement input rate. The server uses input_sequence for client-side prediction reconciliation.
Monotonically increasing sequence number. The server echoes
last_processed_input_sequence so the client can replay unacknowledged inputs.Horizontal movement axis input, range [-1.0, 1.0].
Forward/backward movement axis input, range [-1.0, 1.0].
Character facing direction in degrees.
Client-side timestamp in milliseconds for latency measurement.
C_ChatReq — 0x0221
Sends a global chat message over TCP. Maximum length is 512 UTF-8 bytes (enforced client-side before sending).
C_AttackReq — 0x0231
Sends a melee attack command over TCP. The server validates combo step ordering and applies server-authoritative hit detection.
Monotonically increasing per-character sequence number for deduplication.
Current step in the combo chain (1, 2, 3, …).
C_InventoryMoveReq — 0x0252
Requests moving an item between two inventory slots. Uses a 16-byte idempotency key so retries are safe.
16-byte UUID used as an idempotency key. The server returns this value in
S_InventoryOperationResult so the client can match responses to requests.The client’s current inventory revision. If the server’s revision differs, the operation is rejected and the client must re-read the snapshot.
C_InventoryUseReq — 0x0254
Requests using (consuming) an item from a specific slot.
Packets Received by the Client
These areS_ (server-to-client) messages received over TCP, except movement batch notifications which arrive over UDP.
S_EnterGameRes — 0x0202
Response to C_EnterGameReq. On success, contains the UDP token and port to use for C_UdpHelloReq.
S_UdpHelloRes — 0x0205
Response to C_UdpHelloReq. On success, includes the current server time for clock synchronization.
S_SpawnMyCharacter — 0x0203
Sent after S_EnterGameRes succeeds. Provides the character’s initial world position.
S_SpawnOtherCharacter — 0x0206
Sent when another player enters this client’s Area of Interest.
S_DespawnCharacter — 0x0207
Sent when another player exits this client’s Area of Interest or disconnects.
S_MoveNotify — 0x0212
Sent per-player over UDP when MoveBatchNotify is not used. Carries the server-authoritative position.
S_ChatNtf — 0x0222
Global chat broadcast received by all authenticated sessions.
S_AttackAck — 0x0232
Server acknowledgement of a C_AttackReq.
S_InventorySnapshot — 0x0251
Full inventory state sent on enter-game and after any inventory operation.
S_InventoryOperationResult — 0x0253
Result of a C_InventoryMoveReq or C_InventoryUseReq. Contains an updated inventory snapshot on success.
S_ErrorRes — 0x0003
General error response. Sent when any request cannot be processed.
Regenerating Proto Files
IfPacket.proto changes, regenerate the C++ bindings for both the server and client: