Navigation
API > API/Plugins > API/Plugins/OnlineSubsystemUtils
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UNetDriver
- UIpNetDriver
- UDisplayClusterNetDriver
- UNetDriverEOSBase
- UOculusNetDriver
- USteamNetDriver
References
| Module | OnlineSubsystemUtils |
| Header | /Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Classes/IpNetDriver.h |
| Include | #include "IpNetDriver.h" |
Syntax
UCLASS&40;Transient, Config&61;Engine&41;
class UIpNetDriver : public UNetDriver
Variables
| Type | Name | Description | |
|---|---|---|---|
| uint32: 1 | AllowPlayerPortUnreach | Does the game allow clients to remain after receiving ICMP port unreachable errors (handles flakey connections) | |
| uint32: 1 | bExitOnBindFailure | Whether to exit if binding a port failed. | |
| uint32: 1 | LogPortUnreach | Should port unreachable messages be logged | |
| uint32 | MaxPortCountToTry | Number of ports which will be tried if current one is not available for binding (i.e. if told to bind to port N, will try from N to N+MaxPortCountToTry inclusive) | |
| float | PauseReceiveEnd | If pausing socket receives, the time at which this should end |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UIpNetDriver
(
const FObjectInitializer& ObjectInitializer |
Base constructorUIpNetDriver |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FUniqueSocket | CreateAndBindSocket
(
TSharedRef< FInternetAddr > BindAddr, |
Creates, initializes and binds a socket using the given bind address information. | |
| FUniqueSocket | CreateSocketForProtocol
(
const FName& ProtocolType |
Creates a socket set up for communication using the given protocol. | |
| int | Returns the port number to use when a client is creating a socket. | ||
| double | Returns the last time socket recreation was kicked off or completed | ||
| float | |||
| UIpConnection * | |||
| FSocket * | GetSocket () |
Returns the current FSocket to be used with this NetDriver. | |
| bool | HandlePauseReceiveCommand
(
const TCHAR* Cmd, |
||
| bool | HandleRecreateSocketCommand
(
const TCHAR* Cmd, |
||
| bool | HandleSocketsCommand
(
const TCHAR* Cmd, |
Exec command handlers | |
| UE::Net::ERecreateSocketResult | RecreateSocket
(
int32 OverridePort |
Creates a new Socket for the NetDriver/NetConnection's, based on the address/binding of the existing socket, with a new ephemeral port. | |
| void | SetSocketAndLocalAddress
(
const TSharedPtr< FSocket >& SharedSocket |
Set the current NetDriver's Socket/LocalAddr to the given socket (typically after Net Address Resolution). | |
| void | SetSupportsRecreateSocket
(
bool bInSupportsRecreateSocket |
Called by NetDriver subclasses, to specify whether or not they support recreating the active socket | |
| void | TestSuddenPortChange
(
uint32 NumConnections |
Tests a scenario where a connected client suddenly starts sending traffic on a different port (can happen due to a rare router bug. |
Overridden from UNetDriver
| Type | Name | Description | |
|---|---|---|---|
| ISocketSubsystem * | Get the socket subsytem appropriate for this net driver | ||
| bool | InitBase
(
bool bInitAsClient, |
Common initialization between server and client connection setup | |
| bool | InitConnect
(
FNetworkNotify* InNotify, |
Initialize the net driver in client mode | |
| bool | InitListen
(
FNetworkNotify* InNotify, |
Initialize the network driver in server mode (listener) | |
| bool | IsAvailable () |
Returns true if this net driver is valid for the current configuration. | |
| bool | |||
| void | Close socket and Free the memory the OS allocated for this socket | ||
| FString | |||
| void | LowLevelSend
(
TSharedPtr< const FInternetAddr > Address, |
Sends a 'connectionless' (not associated with a UNetConection) packet, to the specified address. | |
| void | TickDispatch
(
float DeltaTime |
Handle time update: read and process packets |
Enums
| Type | Name | Description | |
|---|---|---|---|
| ESocketState | The current state of the NetDriver socket |
Typedefs
| Name | Description |
|---|---|
| FOnNetworkProcessingCausingSlowFrame | Callback for platform handling when networking is taking a long time in a single frame (by default over 1 second). |
Constants
| Name | Description |
|---|---|
| OnNetworkProcessingCausingSlowFrame |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| void | SetSocketAndLocalAddress
(
FSocket* NewSocket |
Use the version of SetSocketAndLocalAddress which takes a TSharedPtr |