UIpNetDriver

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

OnlineSubsystemUtils

Header

/Engine/Plugins/Online/OnlineSubsystemUtils/Source/OnlineSubsystemUtils/Classes/IpNetDriver.h

Include

#include "IpNetDriver.h"

Syntax

UCLASS(Transient, Config=Engine)
class UIpNetDriver : public UNetDriver

Variables

Name Description

Public variable UProperty Config

uint32: 1

 

AllowPlayerPortUnreach

Does the game allow clients to remain after receiving ICMP port unreachable errors (handles flakey connections)

Public variable UProperty Config

uint32: 1

 

LogPortUnreach

Should port unreachable messages be logged

Public variable UProperty Config

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)

Public variable

float

 

PauseReceiveEnd

If pausing socket receives, the time at which this should end

Public variable

FSocket *

 

Socket

Underlying socket communication

Constructors

Name Description

Public function

UIpNetDriver

(
    const FObjectInitializer& ObjectIn...
)

UIpNetDriver

Functions

Name Description

Public function Virtual

FSocket *...

 

CreateSocket()

Public function Virtual

int

 

GetClientPort()

Returns the port number to use when a client is creating a socket.

Public function

UIpConnectio...

 

GetServerConnection()

Public function

bool

 

HandlePauseReceiveCommand

(
    const TCHAR* Cmd,
    FOutputDevice& Ar,
    UWorld* InWorld
)

Public function

bool

 

HandleSocketsCommand

(
    const TCHAR* Cmd,
    FOutputDevice& Ar,
    UWorld* InWorld
)

Exec command handlers

Public function

UNetConnecti...

 

ProcessConnectionlessPacket

(
    const TSharedRef< FInternetAddr >&...,
    uint8* Data,
    int32& CountBytesRef
)

Processes packets not associated with a NetConnection, performing any handshaking and NetConnection creation or remapping, as necessary.

Public function

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

Name Description

Public function Virtual

ISocketSubsy...

 

GetSocketSubsystem()

Get the socket subsytem appropriate for this net driver

Public function Virtual

bool

 

InitBase

(
    bool bInitAsClient,
    FNetworkNotify* InNotify,
    const FURL& URL,
    bool bReuseAddressAndPort,
    FString& Error
)

Common initialization between server and client connection setup

Public function Virtual

bool

 

InitConnect

(
    FNetworkNotify* InNotify,
    const FURL& ConnectURL,
    FString& Error
)

Initialize the net driver in client mode

Public function Virtual

bool

 

InitListen

(
    FNetworkNotify* InNotify,
    FURL& ListenURL,
    bool bReuseAddressAndPort,
    FString& Error
)

Initialize the network driver in server mode (listener)

Public function Virtual Const

bool

 

IsAvailable()

Returns true if this net driver is valid for the current configuration.

Public function Virtual

bool

 

IsNetResourceValid()

Public function Virtual

void

 

LowLevelDestroy()

Close socket and Free the memory the OS allocated for this socket

Public function Virtual

FString

 

LowLevelGetNetworkNumber()

Public function Virtual

void

 

LowLevelSend

(
    TSharedPtr< const FInternetAddr > A...,
    void* Data,
    int32 CountBits,
    FOutPacketTraits& Traits
)

Sends a 'connectionless' (not associated with a UNetConection) packet, to the specified address.

Public function Virtual

void

 

TickDispatch

(
    float DeltaTime
)

Handle time update: read and process packets

Overridden from FExec

Name Description

Public function Virtual

bool

 

Exec

(
    UWorld* InWorld,
    const TCHAR* Cmd,
    FOutputDevice& Ar
)

Handle exec commands

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

For backwards compatibility with the engine stateless connect code

Select Skin
Light
Dark

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback