Navigation
API > API/Plugins > API/Plugins/WebSocketNetworking > API/Plugins/WebSocketNetworking/IWebSocketServer
Description
Extends the websocket server to additionally serve static content from on-disk directories using HTTP or HTTPS. These HTTP or HTTPS requests will use the same port as the one specified for websocket use in Init_. Note: This function will not start the webserver, call Init_ to start the websocket/webserver.
| Name | EnableHTTPServer |
| Type | function |
| Header File | /Engine/Plugins/Experimental/WebSocketNetworking/Source/WebSocketNetworking/Public/IWebSocketServer.h |
| Include Path | #include "IWebSocketServer.h" |
void EnableHTTPServer
(
TArray < FWebSocketHttpMount > DirectoriesToServe,
bool bSecure,
const FWebSocketServerCertificates & Certificates
)
Parameters
| Name | Remarks |
|---|---|
| DirectoriesToServe | The directories for the Webserver to serve. |
| bSecure | Should the HTTP server serve the directories over HTTPS |
| Certificates | FWebSocketServerCertificates containing paths to SSL certificates required when serving over HTTPS |