Skip to Content
Internet Protocol
Unreal Engine Plugin

About plugin

Overview of the Internet Protocol Unreal Engine plugin: modules, supported engine versions, threading model, errors and limits.

Internet Protocol exposes UDP, TCP, HTTP, Websocket, RTMP and Json modules to the blueprint, plus live audio/video receive and publish over RTMP. The goal of this plugin is, in addition to making it easier, to give you full control over managing connections and manipulating messages via Json.

Modules

  • InternetProtocol World Subsystem.
  • UDP Server and Client side.
  • TCP Server and Client side.
  • Websocket Server and Client side.
  • HTTP Server and Client side.
  • RTMP / RTMPS Server and Client side, with live audio/video receive and publish.
  • Json.
  • Common Utilities.

Supported Unreal Versions

ModulesEnginePlatforms
Networking (UDP, TCP, HTTP, WebSocket, TLS)UE 5 (tested on 5.8)Win64
RTMP and live audio/video (server, receiver and publisher)UE 5.8Win64, DirectX 12 only

Unreal Engine 4.27

Version 4.0 requires Unreal Engine 5. Projects on UE 4.27 must stay on the 3.x releases. See Migrating to 4.0.

Threading

Since 3.0.2 the plugin owns its network threads:

  • One shared I/O service runs on a small fixed pool (half of the CPU cores, between 1 and 4 threads). Since 4.0 it starts on first use, so commandlets that do not use the network do not start it. You no longer need Join Threads or Stop Threads; both are deprecated and do nothing.
  • Every event and callback (On Connected, On Message, message sent callbacks, HTTP responses...) runs on the Game Thread, so you can use them directly in Blueprints.
  • Each connection runs on its own strand: its handlers never run concurrently, while different connections run in parallel.
  • Destroying an object while it still has pending operations is safe: results that arrive later are discarded instead of touching a destroyed object.
  • The Game Thread never blocks on network work. Pending connections are closed when the engine shuts down.
  • Since 4.0 the subsystem owns the objects it creates and closes them when the world ends (for example at the end of Play In Editor).
  • Since 4.0 a connection stops reading when the Game Thread falls more than Max Pending Receive MB (8 MiB) behind, so the peer slows down instead of filling memory. UDP drops datagrams instead.

Errors

Get Error Code and the On Error events return an FErrorCode with a Message, a Value and, since 4.0, a Category (System, SSL, Plugin, Http or WebSocket): the same Value means different things in different categories. Besides the errors reported by the OS, Asio and OpenSSL, the plugin reports its own errors (category Plugin):

MessageWhen
Network service is not runningAn object is used before the module started or after it shut down.
Invalid argumentA host name, or a port outside 0-65535, was passed to a server Open / Bind.
TLS configuration failedThe Security Context Options are invalid (bad certificate or key, key that does not match, server without a certificate).
Send queue is fullMore than Max Queued MB is waiting to be sent: Write / Send fail, or an HTTP request could not be queued.
Malformed HTTP messageHTTP client: the server response could not be parsed.
Connection closedHTTP client: the connection was closed (or Close was called) while the request was pending.
Operation timed out4.0: Connect Timeout Seconds, Handshake Timeout Seconds, an idle timeout or an HTTP request Timeout Seconds expired.
Operation cancelled4.0: HTTP request cancelled with Cancel, or by Set Host to another host.
Message too large4.0: a TCP framed message is larger than Max Message Bytes.

WebSocket protocol problems are reported through the On Close code (1002, 1007, 1009) instead of an error.

Limits

LimitDefaultConfigurable with
Data waiting to be sent per connection64 MiBMax Queued MB (bind options)
Received data waiting for the Game Thread8 MiBMax Pending Receive MB
Connections per server1024Max Connections
Client connect (DNS + connect + TLS + upgrade)15 sConnect Timeout Seconds
Server handshake (TLS, HTTP headers, upgrade)10 sHandshake Timeout Seconds
UDP receive buffer64 KiB(oversized datagrams are dropped and counted)
Datagrams waiting to be sent per UDP socket16 MiB
TCP framed message16 MiBMax Message Bytes (framing)
WebSocket message size64 MiB(larger messages close with code 1009)
WebSocket keep-alivePing after 20 s, close after 60 s idlePing Interval Seconds, Idle Timeout Seconds
HTTP headers / body (server)64 KiB / 64 MiBMax Header Bytes, Max Body Bytes
HTTP server idle connection60 sIdle Timeout Seconds
HTTP unanswered request503 after 30 sResponse Timeout Seconds

Changelogs

See the full changelogs. Latest: 4.0.0, unified TLS classes, hardened protocols, new timeouts and limits, and many new features. See Migrating to 4.0.

Edit on GitHub

On this page