FMultichannelTcpSocket

Class to multiplex several streams on a single TCP socket.

Windows
MacOS
Linux

References

Module

Sockets

Header

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

Include

#include "MultichannelTcpSocket.h"

Syntax

class FMultichannelTcpSocket

Remarks

Class to multiplex several streams on a single TCP socket.

The primary feature here is to allow blocking reads to multiple channels simultaneously without interference. Generally one of these is created on both sides of the connection, immediately after the connection is established

Constructors

Name Description

Public function

FMultichannelTcpSocket

(
    FSocket* InSocket,
    uint64 InBandwidthLatencyProduct
)

Creates and initializes a new instance.

Functions

Name Description

Public function

int32

 

BlockingReceive

(
    uint8* Data,
    int32 Count,
    uint32 Channel
)

Block until data is available to receive.

Public function

int32

 

DataAvailable

(
    uint32 Channel
)

Non-blocking test of available data.

Public function

int32

 

PollingReceive

(
    uint8* Data,
    int32 MaxCount,
    uint32 Channel
)

Non-blocking return of available data.

Public function

void

 

Send

(
    const uint8* Data,
    int32 Count,
    uint32 Channel
)

Send data out a given channel, this does not block on bandwidth, and never fails.

Constants

Name

Description

ControlChannel

Defines the control channel.

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