Navigation
API > API/Runtime > API/Runtime/NetCore
Generic result struct for Network Results (e.g. Close and failures) - partially adapted from FOnlineError/FResult. ResultEnum must have LexToString implemented, and DECLARE_NETRESULT_ENUM(ResultEnum) must be declared for each enum type.
NOTE: Support for using results to modify control flow, depends on how they are implemented in the netcode.
| Name | TNetResult |
| Type | struct |
| Header File | /Engine/Source/Runtime/Net/Core/Public/Net/Core/Connection/NetResult.h |
| Include Path | #include "Net/Core/Connection/NetResult.h" |
Syntax
template<typename ResultEnum>
struct TNetResult : public UE::Net::FNetResult
Inheritance Hierarchy
- FNetResult → TNetResult
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TNetResult
(
ResultEnum InResult |
Default constructor | Net/Core/Connection/NetResult.h | |
TNetResult
(
ResultEnum InResult, |
Main constructor, specifying full result (usually error) | Net/Core/Connection/NetResult.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| UnderlyingResultType | __underlying_type(ResultEnum) | Net/Core/Connection/NetResult.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const FString & GetErrorContext() |
Net/Core/Connection/NetResult.h | ||
ResultEnum GetResult() |
Net/Core/Connection/NetResult.h | ||
bool HasChainResult
(
const TNetResult& A |
Determines whether the specified result is contained within this result chain NOTE: Also checks against the error code | Net/Core/Connection/NetResult.h | |
FString ToString
(
ENetResultString ConversionType |
Convert result to human readable string (ExportText style) | Net/Core/Connection/NetResult.h | |
bool WasSuccessful() |
Accessors | Net/Core/Connection/NetResult.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static const TCHAR * DefaultErrorContext
(
ResultEnum InResult |
Default ErrorContext based on ResultEnum | Net/Core/Connection/NetResult.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
ResultEnum A |
Net/Core/Connection/NetResult.h | ||
bool operator==
(
ResultEnum A |
Operators | Net/Core/Connection/NetResult.h |