Navigation
API > API/Runtime > API/Runtime/Networking
Implements a fluent builder for TCP sockets.
| Name | FTcpSocketBuilder |
| Type | class |
| Header File | /Engine/Source/Runtime/Networking/Public/Common/TcpSocketBuilder.h |
| Include Path | #include "Common/TcpSocketBuilder.h" |
Syntax
class FTcpSocketBuilder
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FTcpSocketBuilder
(
const FString& InDescription |
Creates and initializes a new instance. | Common/TcpSocketBuilder.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Blocking | bool | Holds a flag indicating whether socket operations are blocking. | Common/TcpSocketBuilder.h | |
| Bound | bool | Holds a flag indicating whether the socket should be bound. | Common/TcpSocketBuilder.h | |
| BoundEndpoint | FIPv4Endpoint | Holds the IP address (and port) that the socket will be bound to. | Common/TcpSocketBuilder.h | |
| Description | FString | Holds the socket's debug description text. | Common/TcpSocketBuilder.h | |
| Linger | bool | Holds a flag indicating whether the socket should linger after closing. | Common/TcpSocketBuilder.h | |
| LingerTimeout | int32 | Holds the amount of time the socket will linger before closing. | Common/TcpSocketBuilder.h | |
| Listen | bool | Holds a flag indicating whether the socket should listen for incoming connections. | Common/TcpSocketBuilder.h | |
| ListenBacklog | int32 | Holds the number of connections to queue up before refusing them. | Common/TcpSocketBuilder.h | |
| ReceiveBufferSize | int32 | The desired size of the receive buffer in bytes (0 = default). | Common/TcpSocketBuilder.h | |
| Reusable | bool | Holds a flag indicating whether the bound address can be reused by other sockets. | Common/TcpSocketBuilder.h | |
| SendBufferSize | int32 | The desired size of the send buffer in bytes (0 = default). | Common/TcpSocketBuilder.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Sets socket operations to be blocking. | Common/TcpSocketBuilder.h | ||
| Sets socket operations to be non-blocking. | Common/TcpSocketBuilder.h | ||
| Makes the bound address reusable by other sockets. | Common/TcpSocketBuilder.h | ||
FTcpSocketBuilder AsReusable
(
bool bInReusable |
Sets re-usability of the bound address by other sockets. | Common/TcpSocketBuilder.h | |
FTcpSocketBuilder BoundToAddress
(
const FIPv4Address& Address |
Sets the local address to bind the socket to. | Common/TcpSocketBuilder.h | |
FTcpSocketBuilder BoundToEndpoint
(
const FIPv4Endpoint& Endpoint |
Sets the local endpoint to bind the socket to. | Common/TcpSocketBuilder.h | |
FTcpSocketBuilder BoundToPort
(
uint16 Port |
Sets the local port to bind the socket to. | Common/TcpSocketBuilder.h | |
FSocket * Build() |
Builds the socket as configured. | Common/TcpSocketBuilder.h | |
FTcpSocketBuilder Lingering
(
int32 Timeout |
Sets how long the socket will linger after closing. | Common/TcpSocketBuilder.h | |
FTcpSocketBuilder Listening
(
int32 MaxBacklog |
Sets the socket into a listening state for incoming connections. | Common/TcpSocketBuilder.h | |
FTcpSocketBuilder WithReceiveBufferSize
(
int32 SizeInBytes |
Specifies the desired size of the receive buffer in bytes (0 = default). | Common/TcpSocketBuilder.h | |
FTcpSocketBuilder WithSendBufferSize
(
int32 SizeInBytes |
Specifies the desired size of the send buffer in bytes (0 = default). | Common/TcpSocketBuilder.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
operator FSocket *() |
Implicit conversion operator that builds the socket as configured. | Common/TcpSocketBuilder.h |