UnrealModFramework
Mod framework API
Loading...
Searching...
No Matches
ModExtensionSession.h
Go to the documentation of this file.
1// Copyright (c) 2026 Nelaric Contributors
3#pragma once
4
5#include "CoreMinimal.h"
6
8class UNetConnection;
9struct FURL;
10
11namespace Mod::Extension
12{
18class MODAPI_API FModNetworkHandshake
19{
20public:
22 static FString GetContractDigest();
24 static FString MakeLoginOption(const UModExtensionSubsystem* Extensions);
26 static bool VerifyLogin(const UModExtensionSubsystem& Extensions, const FString& Options, FString& Error);
28 static bool SendPlan(const UModExtensionSubsystem& Extensions, UNetConnection& Connection);
30 bool ReceivePlan(UNetConnection& Connection, uint8 Message, const FString& Value, FString& Error);
32 bool GetExpectedPlan(const UNetConnection& Connection, const FURL& URL, FString& Digest, FString& Error) const;
34 static bool ConfirmPlan(const UModExtensionSubsystem& Extensions, UNetConnection& Connection,
35 const FString& Digest);
37 static bool ReceiveAcknowledgment(const UModExtensionSubsystem& Extensions, uint8 Message, const FString& Value,
38 bool& bAccepted);
40 void Reset();
41
42private:
43 TWeakObjectPtr<UNetConnection> Peer;
44 FString ExpectedMap;
45 FString ExpectedDigest;
46};
47} // namespace Mod::Extension
Game Thread handshake on UE's pending connection.
Definition ModExtensionSession.h:19
static FString GetContractDigest()
Fingerprints the generated host API, Hook, and Event contracts.
static bool ReceiveAcknowledgment(const UModExtensionSubsystem &Extensions, uint8 Message, const FString &Value, bool &bAccepted)
Checks whether an acknowledgment matches the ready server plan.
bool GetExpectedPlan(const UNetConnection &Connection, const FURL &URL, FString &Digest, FString &Error) const
Verifies the pending peer and map before UE loads network gameplay.
static bool SendPlan(const UModExtensionSubsystem &Extensions, UNetConnection &Connection)
Sends the server's plan before UE sends Welcome.
static FString MakeLoginOption(const UModExtensionSubsystem *Extensions)
Builds the single URL option submitted in the client's login request.
void Reset()
Clears the plan when the pending join ends or fails.
bool ReceivePlan(UNetConnection &Connection, uint8 Message, const FString &Value, FString &Error)
Accepts and validates a control message for the current pending join.
static bool VerifyLogin(const UModExtensionSubsystem &Extensions, const FString &Options, FString &Error)
Compares the client's admitted releases with the ready server World.
static bool ConfirmPlan(const UModExtensionSubsystem &Extensions, UNetConnection &Connection, const FString &Digest)
Confirms the ready client plan to the server on the pending connection.
Prepares and owns the extension plan for a single game World.
Definition ModExtensionSubsystem.h:203