ISocketSubsystem::CreateSocket

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

Choose your operating system:

Windows

macOS

Linux

Deprecated

  • Use the CreateSocket with the FName parameter for support for multiple protocol types.

References

Module

Sockets

Header

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

Include

#include "SocketSubsystem.h"

Syntax

virtual FSocket * CreateSocket
(
    const FName & SocketType,
    const FString & SocketDescription,
    ESocketProtocolFamily ProtocolType
)

Remarks

Creates a socket

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

Returns

the new socket or NULL if failed

Parameters

Parameter

Description

SocketDescription

debug description

ProtocolType

the socket protocol to be used. Each subsystem must handle the None case and output a valid socket regardless.