FTcpSocketBuilder

Syntax

class FTcpSocketBuilder

Remarks

Implements a fluent builder for TCP sockets.

Constructors

Name Description

Public function

FTcpSocketBuilder

(
    const FString & InDescription
)

Creates and initializes a new instance.

Functions

Name Description

Public function

FTcpSocketBu ...

 

AsBlocking()

Sets socket operations to be blocking.

Public function

FTcpSocketBu ...

 

AsNonBlocking()

Sets socket operations to be non-blocking.

Public function

FTcpSocketBu ...

 

AsReusable()

Makes the bound address reusable by other sockets.

Public function

FTcpSocketBu ...

 

BoundToAddress

(
    const FIPv4Address & Address
)

Sets the local address to bind the socket to.

Public function

FTcpSocketBu ...

 

BoundToEndpoint

(
    const FIPv4Endpoint & Endpoint
)

Sets the local endpoint to bind the socket to.

Public function

FTcpSocketBu ...

 

BoundToPort

(
    int32 Port
)

Sets the local port to bind the socket to.

Public function Const

FSocket *...

 

Build()

Builds the socket as configured.

Public function

FTcpSocketBu ...

 

Lingering

(
    int32 Timeout
)

Sets how long the socket will linger after closing.

Public function

FTcpSocketBu ...

 

Listening

(
    int32 MaxBacklog
)

Sets the socket into a listening state for incoming connections.

Public function

FTcpSocketBu ...

 

WithReceiveBufferSize

(
    int32 SizeInBytes
)

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

Public function

FTcpSocketBu ...

 

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.

References

Module

Networking

Header

Runtime/Networking/Public/Common/TcpSocketBuilder.h