ISocketSubsystem::CreateUniqueSocket

Creates a socket using the given protocol name, wrapped in a unique pointer that will call DestroySocket automatically - do not call it explicitly! This SocketSubsystem must also outlive the sockets it creates.

Windows
MacOS
Linux

References

Module

Sockets

Header

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

Include

#include "SocketSubsystem.h"

Source

/Engine/Source/Runtime/Sockets/Private/SocketSubsystem.cpp

Syntax

FUniqueSocket CreateUniqueSocket
(
    const FName & SocketType,
    const FString & SocketDescription,
    const FName & ProtocolName
)

Remarks

Creates a socket using the given protocol name, wrapped in a unique pointer that will call DestroySocket automatically - do not call it explicitly! This SocketSubsystem must also outlive the sockets it creates.

SocketType type of socket to create (DGram, Stream, etc)

Returns

the new socket or NULL if failed

Parameters

Parameter

Description

SocketDescription

debug description

ProtocolName

the name of the internet protocol to use for this socket. None should be handled.

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