Navigation
API > API/Runtime > API/Runtime/DirectLink
FEndpoint class is the main interface for sending and receiving data with the DirectLink system.
Instances of this class discover themselves (through MessageBus) and can see Sources and Destinations available on each others. This is automatic and works for multiple applications. With that system, one can expose data from an application and consume it from another.
An endpoint can exposes N sources and N Destinations. That being said, a more classic setup is to have an 'exporter' process that only exposes sources, and some 'consumer' process that only have Destinations.
As a convention, 'consumers' have the responsibility to handle the connections management. Exporters have the sole responsibility to exposes their data.
Setup example:
- Exporter process
- Source "My First Source"
- Source "My Second Source"
- Consumer process
- Destination "Viewport"
The consumer process can handle the connections between Sources and Destinations with the OpenStream and CloseStream methods.
| Name | FEndpoint |
| Type | class |
| Header File | /Engine/Source/Runtime/Datasmith/DirectLink/Public/DirectLinkEndpoint.h |
| Include Path | #include "DirectLinkEndpoint.h" |
Syntax
class FEndpoint : public FNoncopyable
Inheritance Hierarchy
- FNoncopyable → FEndpoint
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FEndpoint
(
const FString& InName |
DirectLinkEndpoint.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FEndpoint() |
DirectLinkEndpoint.h |
Enums
Public
| Name | Remarks |
|---|---|
| EOpenStreamResult |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Internal | FInternalThreadState & | DirectLinkEndpoint.h | ||
| InternalPtr | TUniquePtr< class FInternalThreadState > | DirectLinkEndpoint.h | ||
| SharedState | FSharedState & | DirectLinkEndpoint.h | ||
| SharedStatePtr | TUniquePtr< class FSharedState > | DirectLinkEndpoint.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FDestinationHandle AddDestination
(
const FString& Name, |
Add a Destination on that endpoint | DirectLinkEndpoint.h | |
void AddEndpointObserver
(
IEndpointObserver* Observer |
Register an IEndpointObserver that will be notified periodically with the last state of the swarm. | DirectLinkEndpoint.h | |
FSourceHandle AddSource
(
const FString& Name, |
Add a Source to that endpoint. | DirectLinkEndpoint.h | |
void CloseStream
(
const FSourceHandle& SourceId, |
Close a previously opened stream | DirectLinkEndpoint.h | |
| Get a snapshot of the current state of the DirectLink swarm. | DirectLinkEndpoint.h | ||
EOpenStreamResult OpenStream
(
const FSourceHandle& SourceId, |
Open a Stream between a Source and a Destination | DirectLinkEndpoint.h | |
void RemoveDestination
(
const FDestinationHandle& Destination |
Disconnect all streams related to that destination and removes the Destination itself from that endpoint | DirectLinkEndpoint.h | |
void RemoveEndpointObserver
(
IEndpointObserver* Observer |
Removes a previously added observer | DirectLinkEndpoint.h | |
void RemoveSource
(
const FSourceHandle& Source |
Closes all streams related to this Source and remove it from the endpoint. | DirectLinkEndpoint.h | |
void SetSourceRoot
(
const FSourceHandle& Source, |
Set the root of the content that should be exposed from that source. | DirectLinkEndpoint.h | |
void SetVerbose
(
bool bVerbose |
DirectLinkEndpoint.h | ||
void SnapshotSource
(
const FSourceHandle& Source |
Use the Source root to discover the graph and snapshot the content in its current state. | DirectLinkEndpoint.h |