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

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

#include <TcpSocketBuilder.h>

Public 成员函数

FTcpSocketBuilder AsBlocking ()
 Sets socket operations to be blocking. 更多...
 
FTcpSocketBuilder AsNonBlocking ()
 Sets socket operations to be non-blocking. 更多...
 
FTcpSocketBuilder AsReusable ()
 Makes the bound address reusable by other sockets. 更多...
 
FTcpSocketBuilder AsReusable (bool bInReusable)
 Sets re-usability of the bound address by other sockets. 更多...
 
FTcpSocketBuilder BoundToAddress (const FIPv4Address &Address)
 Sets the local address to bind the socket to. 更多...
 
FTcpSocketBuilder BoundToEndpoint (const FIPv4Endpoint &Endpoint)
 Sets the local endpoint to bind the socket to. 更多...
 
FTcpSocketBuilder BoundToPort (int32 Port)
 Sets the local port to bind the socket to. 更多...
 
FSocket * Build () const
 Builds the socket as configured. 更多...
 
 FTcpSocketBuilder (const FString &InDescription)
 Creates and initializes a new instance. 更多...
 
FTcpSocketBuilder Lingering (int32 Timeout)
 Sets how long the socket will linger after closing. 更多...
 
FTcpSocketBuilder Listening (int32 MaxBacklog)
 Sets the socket into a listening state for incoming connections. 更多...
 
 operator FSocket * () const
 Implicit conversion operator that builds the socket as configured. 更多...
 
FTcpSocketBuilder WithReceiveBufferSize (int32 SizeInBytes)
 Specifies the desired size of the receive buffer in bytes (0 = default). 更多...
 
FTcpSocketBuilder WithSendBufferSize (int32 SizeInBytes)
 Specifies the desired size of the send buffer in bytes (0 = default). 更多...
 

详细描述

Implements a fluent builder for TCP sockets.

构造及析构函数说明

◆ FTcpSocketBuilder()

FTcpSocketBuilder::FTcpSocketBuilder ( const FString &  InDescription)
inline

Creates and initializes a new instance.

参数
InDescriptionDebug description for the socket.

成员函数说明

◆ AsBlocking()

FTcpSocketBuilder FTcpSocketBuilder::AsBlocking ( )
inline

Sets socket operations to be blocking.

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

◆ AsNonBlocking()

FTcpSocketBuilder FTcpSocketBuilder::AsNonBlocking ( )
inline

Sets socket operations to be non-blocking.

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

◆ AsReusable() [1/2]

FTcpSocketBuilder FTcpSocketBuilder::AsReusable ( )
inline

Makes the bound address reusable by other sockets.

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

◆ AsReusable() [2/2]

FTcpSocketBuilder FTcpSocketBuilder::AsReusable ( bool  bInReusable)
inline

Sets re-usability of the bound address by other sockets.

参数
bInReusableWhether to enable or disable re-usability of the bound address.
返回
This instance (for method chaining).
参见
AsNonBlocking, AsNonBlocking

◆ BoundToAddress()

FTcpSocketBuilder FTcpSocketBuilder::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()

FTcpSocketBuilder FTcpSocketBuilder::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()

FTcpSocketBuilder FTcpSocketBuilder::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, BoundToEndpoint

◆ Build()

FSocket * FTcpSocketBuilder::Build ( ) const
inline

Builds the socket as configured.

返回
The built socket.

◆ Lingering()

FTcpSocketBuilder FTcpSocketBuilder::Lingering ( int32  Timeout)
inline

Sets how long the socket will linger after closing.

参数
TimeoutThe amount of time to linger before closing.
返回
This instance (for method chaining).

◆ Listening()

FTcpSocketBuilder FTcpSocketBuilder::Listening ( int32  MaxBacklog)
inline

Sets the socket into a listening state for incoming connections.

参数
MaxBacklogThe number of connections to queue before refusing them.
返回
This instance (for method chaining).

◆ operator FSocket *()

FTcpSocketBuilder::operator FSocket * ( ) const
inline

Implicit conversion operator that builds the socket as configured.

返回
The built socket.

◆ WithReceiveBufferSize()

FTcpSocketBuilder FTcpSocketBuilder::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()

FTcpSocketBuilder FTcpSocketBuilder::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

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