Navigation
API > API/Runtime > API/Runtime/Networking > API/Runtime/Networking/Common
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
| Type | Name | Description | |
|---|---|---|---|
FUdpSocketBuilder
(
const FString& InDescription |
Creates and initializes a new instance. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FUdpSocketBuilder & | AsBlocking () |
Sets socket operations to be blocking. | |
| FUdpSocketBuilder & | Sets socket operations to be non-blocking. | ||
| FUdpSocketBuilder & | AsReusable () |
Makes the bound address reusable by other sockets. | |
| FUdpSocketBuilder & | BoundToAddress
(
const FIPv4Address& Address |
Sets the local address to bind the socket to. | |
| FUdpSocketBuilder & | BoundToEndpoint
(
const FIPv4Endpoint& Endpoint |
Sets the local endpoint to bind the socket to. | |
| FUdpSocketBuilder & | BoundToPort
(
uint16 Port |
Sets the local port to bind the socket to. | |
| FSocket * | Build () |
Builds the socket as configured. | |
| FUdpSocketBuilder & | JoinedToGroup
(
const FIPv4Address& GroupAddress, |
Joins the socket to the specified multicast group. | |
| FUdpSocketBuilder & | JoinedToGroup
(
const FIPv4Address& GroupAddress |
Joins the socket to the specified multicast group. | |
| FUdpSocketBuilder & | Enables broadcasting. | ||
| FUdpSocketBuilder & | WithMulticastInterface
(
const FIPv4Address& InterfaceAddress |
Sets the multicast outgoing interface. | |
| FUdpSocketBuilder & | Enables multicast loopback. | ||
| FUdpSocketBuilder & | WithMulticastTtl
(
uint8 TimeToLive |
Sets the multicast time-to-live. | |
| FUdpSocketBuilder & | WithReceiveBufferSize
(
int32 SizeInBytes |
Specifies the desired size of the receive buffer in bytes (0 = default). | |
| FUdpSocketBuilder & | WithSendBufferSize
(
int32 SizeInBytes |
Specifies the desired size of the send buffer in bytes (0 = default). |
Operators
| Type | Name | Description | |
|---|---|---|---|
| Implicit conversion operator that builds the socket as configured. |