Internet Protocol
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

#include "http/httpserver.h"

UHttpServer* net = NewObject<UHttpServer>();

Variables

Backlog

  • Set/Get the maximum number of simultaneous client connections the server will accept in queue.
Backlog
Output pin

Idle Timeout Seconds

  • Set/Get timeout value in seconds
Idle Timeout Seconds
Output pin

Functions

Is Open

  • Return true if socket is open.
𝑓
Is Open
Return Value
Output pin

Local Endpoint

  • Get the local endpoint of the socket. Use this function only after open connection.
𝑓
Local Endpoint
Return Value
Output pin

Clients

  • Gets a constant reference to the set of clients connected to the server.
𝑓
Clients
Return Value
Output pin

Get Error Code

  • Return a struct of the latest error code returned by asio.
𝑓
Get Error Code
Return Value
Output pin

Open

  • Opens the TCP server and starts listening for incoming connections.
  • It returns false if socket is already open or if asio return any error code during the bind.
𝑓
Open
Target is Http Server
Input pin
Input pin
Target
Input pin
Bind Opts
Output pin
Return Value
Output pin

Close

  • Close the underlying socket and stop listening for data on it. 'on_close' event will be triggered.
𝑓
Close
Target is Http Server
Input pin
Input pin
Target
Output pin

All

  • Create a callback to receive requests of any methods for a specific path.
𝑓
All
Target is Http Server
Input pin
Input pin
Target
Input pin
Path
Input pin
Callback
Output pin
On All
Custom Event
Output pin
Request
Output pin
Response
Output pin

Get

  • Create a callback to receive requests of get method for a specific path.
𝑓
Get
Target is Http Server
Input pin
Input pin
Target
Input pin
Path
Input pin
Callback
Output pin
On Get
Custom Event
Output pin
Request
Output pin
Response
Output pin

Post

  • Create a callback to receive requests of post method for a specific path.
𝑓
Post
Target is Http Server
Input pin
Input pin
Target
Input pin
Path
Input pin
Callback
Output pin
On Post
Custom Event
Output pin
Request
Output pin
Response
Output pin

Put

  • Create a callback to receive requests of put method for a specific path.
𝑓
Put
Target is Http Server
Input pin
Input pin
Target
Input pin
Path
Input pin
Callback
Output pin
On Put
Custom Event
Output pin
Request
Output pin
Response
Output pin

Del

  • Create a callback to receive requests of del method for a specific path.
𝑓
Del
Target is Http Server
Input pin
Input pin
Target
Input pin
Path
Input pin
Callback
Output pin
On Del
Custom Event
Output pin
Request
Output pin
Response
Output pin
  • Create a callback to receive requests of head method for a specific path.
𝑓
Head
Target is Http Server
Input pin
Input pin
Target
Input pin
Path
Input pin
Callback
Output pin
On Head
Custom Event
Output pin
Request
Output pin
Response
Output pin

Options

  • Create a callback to receive requests of options method for a specific path.
𝑓
Options
Target is Http Server
Input pin
Input pin
Target
Input pin
Path
Input pin
Callback
Output pin
On Options
Custom Event
Output pin
Request
Output pin
Response
Output pin

Patch

  • Create a callback to receive requests of patch method for a specific path.
𝑓
Patch
Target is Http Server
Input pin
Input pin
Target
Input pin
Path
Input pin
Callback
Output pin
On Patch
Custom Event
Output pin
Request
Output pin
Response
Output pin

Events

On Close

  • Event triggered when socket is closed.
Bind Event to On Close
Input pin
Input pin
Target
Input pin
Event
Output pin
On Close
Custom Event
Output pin

On Error

  • Event triggered if any error occur during async process.
Bind Event to On Error
Input pin
Input pin
Target
Input pin
Event
Output pin
On Error
Custom Event
Output pin
Error Code
Output pin