FSocket::SetLinger

Sets whether and how long a socket will linger after closing.

Windows
MacOS
Linux

References

Module

Sockets

Header

/Engine/Source/Runtime/Sockets/Public/Sockets.h

Include

#include "Sockets.h"

Syntax

bool SetLinger
(
    bool bShouldLinger,
    int32 Timeout
)

Remarks

Sets whether and how long a socket will linger after closing.

Returns

true if the call succeeded, false otherwise.

Parameters

Parameter

Description

bShouldLinger

Whether to have the socket remain open for a time period after closing or not.

Timeout

The amount of time to linger before closing.

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