Files
UnrealEngineUWP/Engine/Source/Runtime/Messaging/Public/IMessageTransport.h
T
marc audy 6553e6cd0a Remove as much C++ deprecation as possible up to 4.17 (along with a few scattered removals from beyond)
#preflight 61eefc77ba69a4fdb220bf23

#ROBOMERGE-AUTHOR: marc.audy
#ROBOMERGE-SOURCE: CL 18712765 in //UE5/Release-5.0/... via CL 18712784 via CL 18713147
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18713191 by marc audy in ue5-main branch]
2022-01-24 15:07:48 -05:00

60 lines
1.5 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Containers/Array.h"
#include "Misc/Guid.h"
#include "Templates/SharedPointer.h"
#include "UObject/NameTypes.h"
class IMessageContext;
class IMessageTransportHandler;
/**
* Interface for message transport technologies.
*
* Licensees can implement this interface to add support for custom message transport
* technologies that are not supported out of the box, i.e. custom network protocols or APIs.
*/
class IMessageTransport
{
public:
/**
* Gets the name of this transport (for debugging purposes).
*
* @return The debug name.
*/
virtual FName GetDebugName() const = 0;
/**
* Starts up the message transport.
*
* @param Handler The handler of inbound transport messages and events.
* @return Whether the transport was started successfully.
* @see StopTransport
*/
virtual bool StartTransport(IMessageTransportHandler& Handler) = 0;
/**
* Shuts down the message transport.
*
* @see StartTransport
*/
virtual void StopTransport() = 0;
/**
* Transports the given message data to the specified network nodes.
*
* @param Context The context of the message to transport.
* @param Recipients The transport nodes to send the message to.
* @return true if the message is being transported, false otherwise.
*/
virtual bool TransportMessage(const TSharedRef<IMessageContext, ESPMode::ThreadSafe>& Context, const TArray<FGuid>& Recipients) = 0;
protected:
/** Virtual destructor. */
virtual ~IMessageTransport() { }
};