FTcpListener

Implements a runnable that listens for incoming TCP connections.

Windows
MacOS
Linux

Inheritance Hierarchy

FRunnable

FTcpListener

References

Module

Networking

Header

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

Include

#include "Common/TcpListener.h"

Syntax

class FTcpListener : public FRunnable

Remarks

Implements a runnable that listens for incoming TCP connections.

Constructors

Name Description

Public function

FTcpListener

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

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

Public function

FTcpListener

(
    FSocket& InSocket,
    const FTimespan& InSleepTime,
    bool bInReusable
)

Creates and initializes a new instance from the specified socket.

Destructors

Name Description

Public function

~FTcpListener()

Destructor.

Functions

Name Description

Public function Const

const FIPv4E...

 

GetLocalEndpoint()

Gets the listener's local IP endpoint.

Public function Const

FSocket *...

 

GetSocket()

Gets the listener's network socket.

Public function Const

bool

 

IsActive()

Checks whether the listener is listening for incoming connections.

Public function

FOnTcpListen...

 

OnConnectionAccepted()

Gets a delegate to be invoked when an incoming connection has been accepted.

Overridden from FRunnable

Name Description

Public function Virtual

void

 

Exit()

Exits the runnable object.

Public function Virtual

bool

 

Init()

Initializes the runnable object.

Public function Virtual

uint32

 

Run()

Runs the runnable object.

Public function Virtual

void

 

Stop()

Stops the runnable object.

This is called if a thread is requested to terminate early.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss