Navigation
API > API/Runtime > API/Runtime/WebSocketServer
Module that manages WebSocket servers. Usage: TSharedPtr
| Name | FWebSocketServerModule |
| Type | class |
| Header File | /Engine/Source/Runtime/Online/WebSocketServer/Public/WebSocketServerModule.h |
| Include Path | #include "WebSocketServerModule.h" |
Syntax
class FWebSocketServerModule :
public IModuleInterface,
public FTSTickerObjectBase
Inheritance Hierarchy
- FTSTickerObjectBase → FWebSocketServerModule
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FWebSocketServerModule() |
WebSocketServerModule.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FWebSocketServerModule() |
WebSocketServerModule.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| Singleton | FWebSocketServerModule * | WebSocketServerModule.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bServersEnabled | bool | WebSocketServerModule.h | ||
| Servers | TMap< uint32, TSharedPtr< IWebSocketServer > > | WebSocketServerModule.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TSharedPtr< IWebSocketServer > GetWebSocketServer
(
uint32 Port |
Returns (or creates) an IWebSocketServer for the given port. | WebSocketServerModule.h | |
void StartAllServers() |
Start all servers (idempotent). | WebSocketServerModule.h | |
void StopAllServers() |
Stop all servers. | WebSocketServerModule.h |
Public Virtual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ShutdownModule() |
WebSocketServerModule.h | ||
virtual void StartupModule() |
WebSocketServerModule.h | ||
virtual bool Tick
(
float DeltaTime |
FTSTickerObjectBase — drives game-thread event dispatch. | WebSocketServerModule.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FWebSocketServerModule & Get() |
Singleton access. Loads the module if needed. | WebSocketServerModule.h | |
static bool IsAvailable() |
Returns true if the module is loaded and ready. | WebSocketServerModule.h |