FTcpListener::FTcpListener

Creates and initializes a new instance from the specified IP endpoint.

Choose your operating system:

Windows

macOS

Linux

References

Module

Networking

Header

/Engine/Source/Runtime/Networking/Public/Common/TcpListener.h

Include

#include "Common/TcpListener.h"

Syntax

FTcpListener
(
    const FIPv4Endpoint & LocalEndpoint,
    const FTimespan & InSleepTime,
    bool bInReusable
)

Remarks

Creates and initializes a new instance from the specified IP endpoint.

Parameters

Parameter

Description

LocalEndpoint

The local IP endpoint to listen on.

SleepTime

The maximum time to wait for a pending connection inside the polling loop (default = 1 second).

Toggles

socket-reusability which allows for other sockets to use the same address (default = true).