Navigation
API > API/Runtime > API/Runtime/Engine
Bidirectional JSON-line remote console.
NOTE: this server does not perform any access control. This can be handled at the higher level by ITransport. Additionally, the server is expected to be compiled out in shipping builds.
Platform code implements ITransport and calls HandleConnection() on a worker thread. Handshake (hello) quickly distinguishes JSON clients from legacy fire-and-forget senders based on a heuristic IsHandshake(). Hello packet is then fully parsed and validated in HandleConnection(). After that point, it will be treated as an error / invalid op.
After the connection is established, the client is automatically subscribed to the console log stream.
Example exchange: -> {"id":1,"op":"hello","version":1} (required handshake) <- {"id":1,"op":"hello","version":1} -> {"id":2,"op":"exec","cmd":"stat unit"} <- {"id":2,"op":"exec","ok":true} <- {"op":"log","cat":"LogTemp","v":"Log","line":"..."} -> {"id":3,"op":"complete","q":"r.Nanite","offset":0,"limit":50} -> {"id":4,"op":"getvar","n":"r.RHI.Name"}
| Name | FRemoteConsoleServer |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Public/RemoteConsoleServer.h |
| Include Path | #include "RemoteConsoleServer.h" |
Syntax
class FRemoteConsoleServer
Structs
| Name | Remarks |
|---|---|
| FCompletionCache | |
| FRecvBuffer | Buffered reader on top of ITransport. |
Interfaces
| Name | Remarks |
|---|---|
| ITransport |
Functions
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void HandleComplete
(
const FString& Prefix, |
RemoteConsoleServer.h | ||
static void HandleConnection
(
ITransport& Transport |
Blocks calling thread for the connection lifetime. | RemoteConsoleServer.h | |
static void HandleExec
(
const FString& Command, |
RemoteConsoleServer.h | ||
static void HandleGetVar
(
const FString& VarName, |
RemoteConsoleServer.h | ||
static bool IsHandshake
(
FAnsiStringView Data |
Returns true if the data looks like a JSON-line handshake. | RemoteConsoleServer.h | |
static bool SendLine
(
ITransport& Transport, |
RemoteConsoleServer.h |