Skip to Content
Internet Protocol
Unreal Engine Plugin

Options and Structs

Reference of the Internet Protocol Unreal Engine plugin options and structs: client and server bind options, TCP framing, connection stats, error codes and HTTP messages.

Structs shared by the UDP, TCP, HTTP, WebSocket and RTMP classes. The defaults below are the ones of version 4.0.

Client Bind Options

FClientBindOptions, passed to Connect on clients (UDP, TCP, WebSocket) and to Set Host on the HTTP client.

FieldTypeDefaultDescription
AddressStringlocalhostHost name or IP address of the server. IPv6 literals may be written [::1].
PortString8080Port or service name.
ProtocolEProtocolTypeAnyIP version to use. Any tries every resolved address.
Connect Timeout SecondsFloat15DNS + connect + TLS handshake (+ WebSocket upgrade) must complete within this time. 0 = no limit. Fails with Operation timed out.
Max Pending Receive MBInteger8Received data not yet handled by the Game Thread. Above it the plugin stops reading, so the peer slows down; UDP drops datagrams instead.
No DelayBooleantrueDisables Nagle's algorithm: small messages leave immediately (lower latency).
Keep AliveBooleanfalseTCP keep-alive probes detect dead peers on idle connections.
Max Queued MBInteger64Data waiting to be sent per connection. Write / Send fail (Send queue is full) above it.
Socket Receive Buffer BytesInteger0OS socket receive buffer (SO_RCVBUF). 0 = OS default. Larger values absorb UDP bursts.
Socket Send Buffer BytesInteger0OS socket send buffer (SO_SNDBUF). 0 = OS default.
Local AddressStringemptyUDP client: local address to bind before connecting (empty = any).
Local PortInteger0UDP client: local port to bind before connecting (0 = any).

Server Bind Options

FServerBindOptions, passed to Open (TCP, HTTP, WebSocket, RTMP servers) and Bind (UDP server).

FieldTypeDefaultDescription
AddressStringlocalhostIP literal, localhost or empty (any address). Host names are not resolved and fail with Invalid argument.
PortInteger8080Port to listen on (0-65535).
ProtocolEProtocolTypeAnyWith Any and an empty address the server listens dual stack (IPv4 and IPv6) on ::.
Max ConnectionsInteger1024Connections above this are refused (closed right after accept).
Handshake Timeout SecondsFloat10TLS handshake, HTTP headers and WebSocket upgrade must complete within this time. 0 = no limit.
Max Pending Receive MBInteger8Per connection, see Client Bind Options.
No DelayBooleantrueDisables Nagle's algorithm on accepted connections.
Keep AliveBooleanfalseTCP keep-alive probes on accepted connections.
Max Queued MBInteger64Data waiting to be sent per connection.
Socket Receive Buffer BytesInteger0OS socket receive buffer. 0 = OS default.
Socket Send Buffer BytesInteger0OS socket send buffer. 0 = OS default.
Reuse AddressBooleantrueAllows binding a port that is still in TIME_WAIT.

Backlog on the server classes is clamped to the maximum allowed by the OS.

Protocol Type

EProtocolType

ValueDescription
V4IPv4 only.
V6IPv6 only.
AnyDefault since 4.0. Clients try every resolved address (IPv4 and IPv6); servers listen dual stack.

TCP Framing Options

FTcpFramingOptions, the Framing variable of the TCP client and TCP server. It decides how the TCP byte stream is cut into messages. Write adds the framing automatically, and On Message receives one whole message at a time.

FieldTypeDefaultDescription
ModeETcpFramingModeRawHow messages are delimited.
Max Message BytesInteger16 MiBLarger messages are a protocol error: On Error (Message too large) and the connection is closed.
DelimiterString\nDelimiter mode only (UTF-8).

TCP Framing Mode

ETcpFramingMode

ValueDescription
RawNo framing: On Message receives whatever each read returned, so one Write may arrive split or merged with others.
Length PrefixedEvery message is preceded by its length (4 bytes, big endian).
DelimiterMessages end with Delimiter (for example \n for line based protocols). The delimiter is not delivered.

Both sides must use the same mode.

Connection Stats

FConnectionStats, returned by Get Stats on TCP and WebSocket connections.

FieldTypeDescription
Bytes SentInteger64Bytes written to the network.
Bytes ReceivedInteger64Bytes read from the network.
Messages SentInteger64Messages sent with Write / Write Buffer.
Messages ReceivedInteger64Messages delivered to On Message.
Queued BytesInteger64Bytes waiting in the send queue.
Round Trip MsFloatWebSocket: last Ping → Pong round trip in ms (-1: none yet).

Error Code

FErrorCode, returned by Get Error Code and sent by the On Error events and message sent callbacks.

FieldTypeDescription
MessageStringHuman readable message.
ValueIntegerError number.
CategoryEErrorCategoryNew in 4.0. Where Value comes from: the same number means different things in different categories.

Error Category

EErrorCategory

ValueDescription
NoneNo error.
SystemOperating system / socket errors (connection refused, reset, host not found...).
SSLTLS errors (certificate verification, handshake).
PluginPlugin errors (timeouts, queue full, invalid argument...). See Errors.
HttpHTTP protocol errors.
WebSocketWebSocket protocol errors.

HTTP Request

FHttpRequest, sent by the HTTP client and received by the HTTP server routes.

FieldTypeDefaultDescription
MethodERequestMethodGETDEL, GET, HEAD, OPTIONS, PATCH, POST or PUT.
PathString/Request path.
VersionString1.1HTTP version.
ParamsMap String → StringQuery parameters (URL-decoded).
HeadersMap String → StringOne value per header name. Repeated values are joined with , (Set-Cookie with a new line).
Header ListArray of FHttpHeaderFieldNew in 4.0. Every header in order, one entry per line (received), or extra headers to send that may repeat.
Route ParamsMap String → StringNew in 4.0. Server: values of the route parameters (:id / *) of the matched route.
BodyStringText body (UTF-8).
Body BytesArray of ByteNew in 4.0. Binary body: sent instead of Body when not empty. Received bodies are always here too.
Timeout SecondsFloat0New in 4.0. Client: fails the request with Operation timed out if the response did not arrive in time. 0 = no limit.

HTTP Response

FHttpResponse, received by the HTTP client and written by the server through the remote's Headers.

FieldTypeDefaultDescription
Status CodeInteger200HTTP status.
Status MessageStringReason phrase.
VersionString1.1HTTP version.
HeadersMap String → StringOne value per header name.
Header ListArray of FHttpHeaderFieldNew in 4.0. Every header in order, for repeated headers such as several Set-Cookie.
BodyStringText body.
Body BytesArray of ByteNew in 4.0. Binary body, sent instead of Body when not empty.

HTTP Header Field

FHttpHeaderField: one header line, with Name and Value.

Dataframe

FDataframe, passed to the WebSocket Write and Write Buffer nodes.

FieldTypeDefaultDescription
FinBooleantruefalse sends a fragment: the first one with the message opcode, the next ones as continuations, until a write with Fin = true ends the message.
Rsv1, Rsv2, Rsv3BooleanfalseNever sent: no WebSocket extension is negotiated.
MaskBooleantrueIgnored on send: clients always mask and servers never mask (RFC 6455).
Edit on GitHub

On this page