engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
FUdpSocketBuilder类 参考

Implements a fluent builder for UDP sockets. 更多...

#include <UdpSocketBuilder.h>

Public 成员函数

FUdpSocketBuilder & AsBlocking ()
 Sets socket operations to be blocking. 更多...
 
FUdpSocketBuilder & AsNonBlocking ()
 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 (int32 Port)
 Sets the local port to bind the socket to. 更多...
 
FSocket * Build () const
 Builds the socket as configured. 更多...
 
 FUdpSocketBuilder (const FString &InDescription)
 Creates and initializes a new instance. 更多...
 
FUdpSocketBuilder & JoinedToGroup (const FIPv4Address &GroupAddress)
 Joins the socket to the specified multicast group. 更多...
 
FUdpSocketBuilder & JoinedToGroup (const FIPv4Address &GroupAddress, const FIPv4Address &InterfaceAddress)
 Joins the socket to the specified multicast group. 更多...
 
 operator FSocket * () const
 Implicit conversion operator that builds the socket as configured. 更多...
 
FUdpSocketBuilder & WithBroadcast ()
 Enables broadcasting. 更多...
 
FUdpSocketBuilder & WithMulticastInterface (const FIPv4Address &InterfaceAddress)
 Sets the multicast outgoing interface. 更多...
 
FUdpSocketBuilder & WithMulticastLoopback ()
 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). 更多...
 

详细描述

Implements a fluent builder for UDP sockets.

构造及析构函数说明

◆ FUdpSocketBuilder()

FUdpSocketBuilder::FUdpSocketBuilder ( const FString &  InDescription)
inline

Creates and initializes a new instance.

参数
InDescriptionDebug description for the socket.

成员函数说明

◆ AsBlocking()

FUdpSocketBuilder & FUdpSocketBuilder::AsBlocking ( )
inline

Sets socket operations to be blocking.

返回
This instance (for method chaining).
参见
AsNonBlocking, AsReusable

◆ AsNonBlocking()

FUdpSocketBuilder & FUdpSocketBuilder::AsNonBlocking ( )
inline

Sets socket operations to be non-blocking.

返回
This instance (for method chaining).
参见
AsBlocking, AsReusable

◆ AsReusable()

FUdpSocketBuilder & FUdpSocketBuilder::AsReusable ( )
inline

Makes the bound address reusable by other sockets.

返回
This instance (for method chaining).
参见
AsBlocking, AsNonBlocking

◆ BoundToAddress()

FUdpSocketBuilder & FUdpSocketBuilder::BoundToAddress ( const FIPv4Address &  Address)
inline

Sets the local address to bind the socket to.

Unless specified in a subsequent call to BoundToPort(), a random port number will be assigned by the underlying provider.

参数
AddressThe IP address to bind the socket to.
返回
This instance (for method chaining).
参见
BoundToEndpoint, BoundToPort

◆ BoundToEndpoint()

FUdpSocketBuilder & FUdpSocketBuilder::BoundToEndpoint ( const FIPv4Endpoint &  Endpoint)
inline

Sets the local endpoint to bind the socket to.

参数
EndpointThe IP endpoint to bind the socket to.
返回
This instance (for method chaining).
参见
BoundToAddress, BoundToPort

◆ BoundToPort()

FUdpSocketBuilder & FUdpSocketBuilder::BoundToPort ( int32  Port)
inline

Sets the local port to bind the socket to.

Unless specified in a subsequent call to BoundToAddress(), the local address will be determined automatically by the underlying provider.

参数
PortThe local port number to bind the socket to.
返回
This instance (for method chaining).
参见
BoundToAddress

◆ Build()

FSocket * FUdpSocketBuilder::Build ( ) const
inline

Builds the socket as configured.

返回
The built socket.

◆ JoinedToGroup() [1/2]

FUdpSocketBuilder & FUdpSocketBuilder::JoinedToGroup ( const FIPv4Address &  GroupAddress)
inline

Joins the socket to the specified multicast group.

参数
GroupAddressThe IP address of the multicast group to join.
返回
This instance (for method chaining).
参见
WithMulticastLoopback, WithMulticastTtl

◆ JoinedToGroup() [2/2]

FUdpSocketBuilder & FUdpSocketBuilder::JoinedToGroup ( const FIPv4Address &  GroupAddress,
const FIPv4Address &  InterfaceAddress 
)
inline

Joins the socket to the specified multicast group.

参数
GroupAddressThe IP address of the multicast group to join.
InterfaceAddressThe IP address of the interface to join the multicast group on.
返回
This instance (for method chaining).
参见
WithMulticastLoopback, WithMulticastTtl

◆ operator FSocket *()

FUdpSocketBuilder::operator FSocket * ( ) const
inline

Implicit conversion operator that builds the socket as configured.

返回
The built socket.

◆ WithBroadcast()

FUdpSocketBuilder & FUdpSocketBuilder::WithBroadcast ( )
inline

Enables broadcasting.

返回
This instance (for method chaining).

◆ WithMulticastInterface()

FUdpSocketBuilder & FUdpSocketBuilder::WithMulticastInterface ( const FIPv4Address &  InterfaceAddress)
inline

Sets the multicast outgoing interface.

参数
InterfaceAddressThe interface to use to send multicast datagrams.
返回
This instance (for method chaining).
参见
JoinedToGroup, WithMulticastLoopback

◆ WithMulticastLoopback()

FUdpSocketBuilder & FUdpSocketBuilder::WithMulticastLoopback ( )
inline

Enables multicast loopback.

参数
AllowLoopbackWhether to allow multicast loopback.
TimeToLiveThe time to live.
返回
This instance (for method chaining).
参见
JoinedToGroup, WithMulticastTtl

◆ WithMulticastTtl()

FUdpSocketBuilder & FUdpSocketBuilder::WithMulticastTtl ( uint8  TimeToLive)
inline

Sets the multicast time-to-live.

参数
TimeToLiveThe time to live.
返回
This instance (for method chaining).
参见
JoinedToGroup, WithMulticastLoopback

◆ WithReceiveBufferSize()

FUdpSocketBuilder & FUdpSocketBuilder::WithReceiveBufferSize ( int32  SizeInBytes)
inline

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

The socket creation will not fail if the desired size cannot be set or if the actual size is less than the desired size.

参数
SizeInBytesThe size of the buffer.
返回
This instance (for method chaining).
参见
WithSendBufferSize

◆ WithSendBufferSize()

FUdpSocketBuilder & FUdpSocketBuilder::WithSendBufferSize ( int32  SizeInBytes)
inline

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

The socket creation will not fail if the desired size cannot be set or if the actual size is less than the desired size.

参数
SizeInBytesThe size of the buffer.
返回
This instance (for method chaining).
参见
WithReceiveBufferSize

该类的文档由以下文件生成: