Lesson 55 - Dedicated Servers Game Mode
This commit is contained in:
30
Source/DedicatedServers/Public/GameLift/GameLiftClp.h
Normal file
30
Source/DedicatedServers/Public/GameLift/GameLiftClp.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
#include "GameLiftClpTypes.h"
|
||||
#include "CoreMinimal.h"
|
||||
|
||||
struct FPortResult
|
||||
{
|
||||
int32 Port;
|
||||
bool bUsedDefaultPort;
|
||||
FString WarningMessage;
|
||||
};
|
||||
|
||||
namespace cmdlineparser
|
||||
{
|
||||
FPortResult GetConfiguredOrDefaultPort(const FString& Token = TEXT("port="));
|
||||
FPortResult GetConfiguredOrDefaultPort(const FString& CommandLine, const FString& Token = TEXT("port="));
|
||||
|
||||
details::FParseResult GetValueOfToken(const FString& CommandLine, const details::EAvailableTokens Token);
|
||||
}
|
||||
|
||||
namespace cmdlineparser::details
|
||||
{
|
||||
inline static constexpr int32 MIN_PORT = 1024;
|
||||
inline static constexpr int32 MAX_PORT = 65535;
|
||||
inline static constexpr const TCHAR* DEFAULT_PORT_TOKEN = TEXT("port=");
|
||||
|
||||
FString EnsureEndsWith(const FString& Token, const TCHAR* Suffix);
|
||||
FPortResult GetConfiguredOrDefaultPort(const FString& CommandLine, const FString& Token);
|
||||
bool DoesRegExMatch(const FString& Text, const FString& Pattern);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user