Choose your operating system:
Windows
macOS
Linux
| UObjectBase
|
Module |
|
Header |
/Engine/Plugins/NetcodeUnitTest/NetcodeUnitTest/Source/NetcodeUnitTest/Classes/MinimalClient.h |
Include |
#include "MinimalClient.h" |
UCLASS()
class UMinimalClient :
public UObject,
public FNetworkNotify,
public FProtMinClientParms,
public FProtMinClientHooks,
public FUnitLogRedirect
Base class for implementing a barebones/stripped-down game client, capable of connecting to a regular game server, but stripped/locked-down so that the absolute minimum of client/server netcode functionality is executed, for connecting the client.
Name | Description | ||
---|---|---|---|
|
bConnected |
Runtime variables Whether or not the minimal client is connected |
|
|
bSentBunch |
Whether or not a bunch was successfully sent |
|
|
PendingNetActorChans |
If notifying of net actor creation, this keeps track of new actor channel indexes pending notification |
|
|
UNetConnection ... |
UnitConn |
Stores a reference to the server connection |
|
UNetDriver *... |
UnitNetDriver |
Stores a reference to the created unit test net driver, for execution and later cleanup |
|
UWorld * |
UnitWorld |
Stores a reference to the created empty world, for execution and later cleanup |
Name | Description | |
---|---|---|
|
UMinimalClient ( |
Name | Description | ||
---|---|---|---|
|
Cleanup() |
Disconnects and cleans up the minimal client. |
|
|
Connect ( |
Connects the minimal client to a server, with Parms specifying the server details and minimal client configuration, and passing back the low level netcode events specified by Hooks. |
|
|
ConnectMinimalClient() |
Creates the minimal client state, and connects to the server |
|
|
FOutBunch &#... |
CreateChannelBunchByName |
Creates a bunch for the specified channel, with the ability to create the channel as well WARNING: Can return nullptr! (e.g. if the control channel is saturated) |
|
CreateNetDriver() |
Creates a net driver for the minimal client |
|
|
DiscardChannelBunch ( |
Discards a created bunch, without sending it - don't use this for sent packets |
|
|
DisconnectMinimalClient() |
Disconnects the minimal client - including destructing the net driver and such (tears down the whole connection) |
|
|
UNetConnecti... |
GetConn() |
Retrieve the value of UnitConn |
|
EMinClientFl... |
GetMinClientFlags() |
Retrieve the value of MinClientFlags |
|
UWorld * |
GetUnitWorld() |
Retrieve the value of UnitWorld |
|
InternalNotifyNetworkFailure ( |
||
|
IsConnected() |
Whether or not the minimal client is connected to the server |
|
|
IsTickable() |
Whether or not the minimal client requires ticking. |
|
|
NotifyReceivedRawPacket |
See FOnReceivedRawPacket |
|
|
NotifyReceiveRPC |
See FOnProcessNetEvent |
|
|
NotifySendRPC |
See FOnSendRPC |
|
|
NotifySocketSend |
See FOnLowLevelSend |
|
|
PostSendRPC |
Internal function, for handling the aftermath of a checked RPC call |
|
|
PreSendRPC() |
Internal function, for preparing for a checked RPC call |
|
|
ResetConnTimeout ( |
Resets the net connection timeout |
|
|
SendControlBunch ( |
Sends a bunch over the control channel |
|
|
SendInitialJoin() |
Sends the packet for triggering the initial join (usually is delayed, by the PacketHandler) |
|
|
SendRawBunch |
Sends a raw packet bunch, directly to the NetConnection, with the option of automatically splitting into partial bunches. |
|
|
SendRPCChecked ( |
As above, except optimized for use with reflection |
|
|
SendRPCChecked |
Sends the specified RPC for the specified actor, and verifies that the RPC was sent (triggering RPCFailureDel if not) |
|
|
UnitTick ( |
Ticks the minimal client, through the owner unit tests UnitTick function |
|
|
WriteControlLogin ( |
Writes the NMT_Login message, as a part of SendInitialJoin (separated to make it overridable) |
Name | Description | ||
---|---|---|---|
|
NotifyAcceptedConnection ( |
Notification that a new connection has been created/established as a result of a remote request, previously approved by NotifyAcceptingConnection |
|
|
NotifyAcceptingChannel ( |
Notification that a new channel is being created/opened as a result of a remote request (Actor creation, etc) |
|
|
EAcceptConne... |
NotifyAcceptingConnection() |
|
|
NotifyControlMessage ( |
Handler for messages sent through a remote connection's control channel not required to handle the message, but if it reads any data from Bunch, it MUST read the ENTIRE data stream for that message (i.e. use FNetControlMessage |
Name | Description | ||
---|---|---|---|
|
FOutBunch &#... |
CreateChannelBunch ( |
Use CreateChannelBunchByName |