FUdpSocketSender

Asynchronously sends data to an UDP socket.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

FRunnable

FSingleThreadRunnable

FUdpSocketSender

References

Module

Networking

Header

/Engine/Source/Runtime/Networking/Public/Common/UdpSocketSender.h

Include

#include "Common/UdpSocketSender.h"

Syntax

class FUdpSocketSender :
    public FRunnable,
    private FSingleThreadRunnable

Remarks

Asynchronously sends data to an UDP socket.

Constructors

Name Description

Public function

FUdpSocketSender

(
    FSocket* InSocket,
    const TCHAR* ThreadDescription
)

Creates and initializes a new socket sender.

Destructors

Name Description

Public function Virtual

~FUdpSocketSender()

Virtual destructor.

Functions

Name Description

Public function Const

uint32

 

GetSendRate()

Gets the maximum send rate (in bytes per second).

Public function Const

uint32

 

GetThroughput()

Gets the current throughput (in bytes per second).

Public function

bool

 

Send

(
    const TSharedRef< TArray< uint8 >, ...,
    const FIPv4Endpoint& Recipient
)

Sends data to the specified recipient.

Public function

void

 

SetSendRate

(
    uint32 Rate
)

Sets the send rate (in bytes per second).

Public function

void

 

SetWaitTime

(
    const FTimespan& Timespan
)

Sets the maximum time span to wait for work items.

Protected function

bool

 

Update

(
    const FTimespan& SocketWaitTime
)

Update this socket sender.

Overridden from FRunnable

Name Description

Public function Virtual

void

 

Exit()

Exits the runnable object.

Public function Virtual

FSingleThrea...

 

GetSingleThreadInterface()

Gets single thread interface pointer used for ticking this runnable when multi-threading is disabled.

Public function Virtual

bool

 

Init()

Initializes the runnable object.

Public function Virtual

uint32

 

Run()

Runs the runnable object.

Public function Virtual

void

 

Stop()

Stops the runnable object.

This is called if a thread is requested to terminate early.

Overridden from FSingleThreadRunnable

Name Description

Protected function Virtual

void

 

Tick()

Tick function.