![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <DirectLinkEndpoint.h>
Inheritance diagram for DirectLink::FEndpoint:Public Types | |
| enum class | EOpenStreamResult { Opened , AlreadyOpened , SourceAndDestinationNotFound , RemoteEndpointNotFound , Unsuppported , CannotConnectToPrivate } |
Additional Inherited Members | |
Protected Member Functions inherited from FNoncopyable | |
| FNoncopyable () | |
| ~FNoncopyable () | |
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:
The consumer process can handle the connections between Sources and Destinations with the OpenStream and CloseStream methods.
|
strong |
| DirectLink::FEndpoint::FEndpoint | ( | const FString & | InName | ) |
| DirectLink::FEndpoint::~FEndpoint | ( | ) |
| FDestinationHandle DirectLink::FEndpoint::AddDestination | ( | const FString & | Name, |
| EVisibility | Visibility, | ||
| const TSharedPtr< class IConnectionRequestHandler > & | ConnectionRequestHandler | ||
| ) |
Add a Destination on that endpoint
| Name | Name of that destination |
| Visibility | Whether this destination should be visible to remote endpoints |
| ConnectionRequestHandler | Object that will handle connections requests from Sources |
| void DirectLink::FEndpoint::AddEndpointObserver | ( | IEndpointObserver * | Observer | ) |
Register an IEndpointObserver that will be notified periodically with the last state of the swarm.
| Observer | Object that should be notified |
| FSourceHandle DirectLink::FEndpoint::AddSource | ( | const FString & | Name, |
| EVisibility | Visibility = EVisibility::Public |
||
| ) |
Add a Source to that endpoint. A source can hold content (a scene snapshot) and is able to stream that content to remote destinations.
| Name | User facing name for this source. |
| Visibility | Whether that Source is visible to remote endpoints |
| void DirectLink::FEndpoint::CloseStream | ( | const FSourceHandle & | SourceId, |
| const FDestinationHandle & | DestinationId | ||
| ) |
Close a previously opened stream
| SourceId | Handle to the Source |
| DestinationId | Handle to the Destination |
| FRawInfo DirectLink::FEndpoint::GetRawInfoCopy | ( | ) | const |
Get a snapshot of the current state of the DirectLink swarm. It includes discovered Endpoints, their sources and destinations, and the streams descriptions.
| FEndpoint::EOpenStreamResult DirectLink::FEndpoint::OpenStream | ( | const FSourceHandle & | SourceId, |
| const FDestinationHandle & | DestinationId | ||
| ) |
Open a Stream between a Source and a Destination
| SourceId | Handle to the Source |
| DestinationId | Handle to the Destination |
| void DirectLink::FEndpoint::RemoveDestination | ( | const FDestinationHandle & | Destination | ) |
Disconnect all streams related to that destination and removes the Destination itself from that endpoint
| Destination | Handle of the destination to remove |
| void DirectLink::FEndpoint::RemoveEndpointObserver | ( | IEndpointObserver * | Observer | ) |
Removes a previously added observer
| Observer | Observer to remove |
| void DirectLink::FEndpoint::RemoveSource | ( | const FSourceHandle & | Source | ) |
Closes all streams related to this Source and remove it from the endpoint.
| Source | Handle of the source to remove |
| void DirectLink::FEndpoint::SetSourceRoot | ( | const FSourceHandle & | Source, |
| ISceneGraphNode * | InRoot, | ||
| bool | bSnapshot | ||
| ) |
Set the root of the content that should be exposed from that source.
| Source | Handle of the source to setup |
| InRoot | Root of the graph that should be exposed |
| bSnapshot | Whether the graph should be snapshotted right away |
| void DirectLink::FEndpoint::SnapshotSource | ( | const FSourceHandle & | Source | ) |
Use the Source root to discover the graph and snapshot the content in its current state.
| Source | Handle of the source to snapshot |