UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FMultichannelTcpSender Class Reference

#include <MultichannelTcpSender.h>

+ Inheritance diagram for FMultichannelTcpSender:

Public Member Functions

 FMultichannelTcpSender (FSocket *InSocket, const FOnMultichannelTcpOkToSend &InOkToSendDelegate)
 
 ~FMultichannelTcpSender ()
 
void AttemptResumeSending ()
 
int32 GetBytesSent ()
 
void Send (const uint8 *Data, int32 Count, uint32 Channel)
 
virtual bool Init ()
 
virtual uint32 Run ()
 
virtual void Stop ()
 
virtual void Exit ()
 
- Public Member Functions inherited from FRunnable
virtual class FSingleThreadRunnableGetSingleThreadInterface ()
 
virtual ~FRunnable ()
 

Protected Member Functions

void AttemptResumeSendingInternal ()
 

Detailed Description

Implements a sender for multichannel TCP sockets.

Constructor & Destructor Documentation

◆ FMultichannelTcpSender()

FMultichannelTcpSender::FMultichannelTcpSender ( FSocket InSocket,
const FOnMultichannelTcpOkToSend InOkToSendDelegate 
)
inline

Creates and initializes a new instance.

Parameters
InSocketThe socket to send to.
InOkToSendDelegateDelegate to ask if it is ok to send a packet.

◆ ~FMultichannelTcpSender()

FMultichannelTcpSender::~FMultichannelTcpSender ( )
inline

Destructor.

Member Function Documentation

◆ AttemptResumeSending()

void FMultichannelTcpSender::AttemptResumeSending ( )
inline

Call when bandwidth tests should be retried, possibly sending data if there is available bandwidth.

◆ AttemptResumeSendingInternal()

void FMultichannelTcpSender::AttemptResumeSendingInternal ( )
inlineprotected

Internal call similar to AttemptResumeSending, but does not do the requisite lock.

◆ Exit()

virtual void FMultichannelTcpSender::Exit ( void  )
inlinevirtual

Exits the runnable object.

Called in the context of the aggregating thread to perform any cleanup.

See also
Init, Run, Stop

Reimplemented from FRunnable.

◆ GetBytesSent()

int32 FMultichannelTcpSender::GetBytesSent ( )
inline

Gets the number of payload bytes actually sent to the socket.

◆ Init()

virtual bool FMultichannelTcpSender::Init ( void  )
inlinevirtual

Initializes the runnable object.

This method is called in the context of the thread object that aggregates this, not the thread that passes this runnable to a new thread.

Returns
True if initialization was successful, false otherwise
See also
Run, Stop, Exit

Reimplemented from FRunnable.

◆ Run()

virtual uint32 FMultichannelTcpSender::Run ( )
inlinevirtual

Runs the runnable object.

This is where all per object thread work is done. This is only called if the initialization was successful.

Returns
The exit code of the runnable object
See also
Init, Stop, Exit

Implements FRunnable.

◆ Send()

void FMultichannelTcpSender::Send ( const uint8 Data,
int32  Count,
uint32  Channel 
)
inline

Sends data through the given channel.

This method does not block on bandwidth and never fails.

Parameters
DataThe buffer containing the data to send.
CountThe number of bytes to send from the buffer.

◆ Stop()

virtual void FMultichannelTcpSender::Stop ( void  )
inlinevirtual

Stops the runnable object.

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

See also
Init, Run, Exit

Reimplemented from FRunnable.


The documentation for this class was generated from the following file: