FUdpSocketBuilder

Implements a fluent builder for UDP sockets.

Windows
MacOS
Linux

References

Module

Networking

Header

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

Include

#include "Common/UdpSocketBuilder.h"

Syntax

class FUdpSocketBuilder

Remarks

Implements a fluent builder for UDP sockets.

Constructors

Name Description

Public function

FUdpSocketBuilder

(
    const FString& InDescription
)

Creates and initializes a new instance.

Functions

Name Description

Public function

FUdpSocketBu...

 

AsBlocking()

Sets socket operations to be blocking.

Public function

FUdpSocketBu...

 

AsNonBlocking()

Sets socket operations to be non-blocking.

Public function

FUdpSocketBu...

 

AsReusable()

Makes the bound address reusable by other sockets.

Public function

FUdpSocketBu...

 

BoundToAddress

(
    const FIPv4Address& Address
)

Sets the local address to bind the socket to.

Public function

FUdpSocketBu...

 

BoundToEndpoint

(
    const FIPv4Endpoint& Endpoint
)

Sets the local endpoint to bind the socket to.

Public function

FUdpSocketBu...

 

BoundToPort

(
    int32 Port
)

Sets the local port to bind the socket to.

Public function Const

FSocket *...

 

Build()

Builds the socket as configured.

Public function

FUdpSocketBu...

 

JoinedToGroup

(
    const FIPv4Address& GroupAddress,
    const FIPv4Address& InterfaceAddre...
)

Joins the socket to the specified multicast group.

Public function

FUdpSocketBu...

 

JoinedToGroup

(
    const FIPv4Address& GroupAddress
)

Joins the socket to the specified multicast group.

Public function

FUdpSocketBu...

 

WithBroadcast()

Enables broadcasting.

Public function

FUdpSocketBu...

 

WithMulticastInterface

(
    const FIPv4Address& InterfaceAddre...
)

Sets the multicast outgoing interface.

Public function

FUdpSocketBu...

 

WithMulticastLoopback()

Enables multicast loopback.

Public function

FUdpSocketBu...

 

WithMulticastTtl

(
    uint8 TimeToLive
)

Sets the multicast time-to-live.

Public function

FUdpSocketBu...

 

WithReceiveBufferSize

(
    int32 SizeInBytes
)

Specifies the desired size of the receive buffer in bytes (0 = default).

Public function

FUdpSocketBu...

 

WithSendBufferSize

(
    int32 SizeInBytes
)

Specifies the desired size of the send buffer in bytes (0 = default).

Operators

Name Description

Public function Const

 

operator FSocket *()

Implicit conversion operator that builds the socket as configured.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss