Unreal Engine Plugin
HTTP Server
How to use HTTP server class
References
#include "Http/HttpServer.h"
How to use
Blueprint: search by GetInternetProtocolSubsystem
and call CreateHttpServer
function
C++: Use the code bellow
Functions
Set Socket
- Set
protocol
,port
,max connected clients
of socket
Get Acceptor
- Get acceptor properties
Get Sockets
- Get all connected sockets properties
Set Headers
- Set response default headers
Get Headers
- Return a reference to response default headers
- Use this function to modify or append value to headers
Send Response
- Send response to specific client
Send Error Response
- Send error response to specific client
Open
- Open connection
Close
- Close connection
- Also can be used to cancel all responses
Disconnect Socket
- Close connection of specific client
- Also can be used to cancel response for specific client
Get Error Code
- Get latest error code
Events
On Socket Accepted
- Event triggered when a new client is connected
On Bytes Transfered
- Event triggered while socket send or receive data
On Request Received
- Event triggered when a request is received by specific socket
On Request Error
- Event triggered when an error is detected in client request
On Response Sent
- Event triggered when a response is sent to specific client
On Socket Disconnected
- Event triggered when a socket is disconnected
On Close
- Event triggered when server is closed
On Error
- Event triggered when an error is detected