Plugin Documentation

SocketSnap
A thin FSocket TCP wrapper, Blueprint-friendly

A minimal, blueprint-friendly mapping over Unreal's FSocket for quick TCP client connections, with connect timeouts and self-cleaning handles.

v1.0.0
UE 4.27–5.0+
Win64 · Mac · Linux
Category Networking
Alpha XP
SocketSnap diagram
SocketSnap — architecture & feature overview

Overview

SocketSnap is a function-library wrapper over FSocket. Open a connection, poll for data, send and receive bytes/strings, and close — ideal when you want direct socket control without writing the boilerplate. Handles also self-clean on garbage collection.

Fork note Module Socketer was renamed to SocketSnap for UE 4.27–5.0+; a UE5-only IWYUSupport Build.cs flag was removed, and connect-timeout, byte send/receive, and conversion helpers were added.

Requirements

RequirementDetails
Unreal Engine4.27–5.0+
LanguageBlueprints and/or C++
PlatformsWin64 · Mac · Linux

Installation

  1. Copy the SocketSnap folder into your project's Plugins/ directory.
  2. C++ projects: regenerate project files and build. Blueprint-only projects can launch the editor directly.
  3. Open Edit → Plugins and confirm SocketSnap is enabled.

Library API

NodeTypeDescription
Connect To TCP ServerCallableOpen a connection (with optional timeout); returns a connection object.
Send Message / Send BytesCallableSend a UTF-8 string or raw bytes.
Get Message / Get BytesCallableRead all currently-pending data.
Has Pending DataPureTrue when data is ready to read.
Is ConnectedPureConnection state.
Get Peer AddressPureRemote address:port.
Close ConnectionCallableClose and destroy the connection.

Conversion & address helpers

NodeTypeDescription
String To Bytes / Bytes To String / Bytes To HexPureConversions.
Hex To Bytes / Base64 Encode / Base64 DecodePureEncode / decode.
Is Valid IPv4 / Parse EndpointPureAddress validation & parsing.

Framing & socket control (v2.1)

Length-prefixed messaging and fine-grained socket control on USocketSnapLibrary.

NodeTypeDescription
Send Framed Message / Send Framed StringCallableSend with a 4-byte big-endian length prefix.
Get Framed MessageCallableExtract one complete framed message from the connection's accumulator.
Send Message LineCallableSend a UTF-8 string plus a line ending.
Wait For DataCallableBlock up to a timeout waiting for readable data.
Get Bytes AvailablePureBytes readable right now without blocking.
Set No DelayCallableToggle Nagle's algorithm (TCP_NODELAY).
Shutdown SendCallableHalf-close: stop sending, keep receiving.
Get Local AddressPureLocal address:port of the connection.
Get Connection StatePureConnected, NotConnected, Error or Invalid.
Make Endpoint / Is Private IPv4PureCompose host:port; RFC1918 range check.

Utility node pack

General-purpose networking utilities added to USocketSnapLibrary — available from Blueprints and C++.

NodeTypeDescription
CRC32 Of BytesPureCRC32 checksum of a byte array.
MD5 Of String / SHA1 Of StringPureHex digests of a UTF-8 string.
Make Guid StringPureNew random GUID (hyphenated).
Now Unix SecondsPureCurrent UTC time as Unix seconds.
Unix Seconds To ISO8601PureUnix seconds → ISO-8601 UTC string.
Format Byte SizePureHuman-readable size, e.g. 1536 → 1.5 KB.
Random TokenPureRandom alphanumeric token (ids, nonces).
XOR Bytes With KeyPureXOR bytes with a repeating key (obfuscation, not encryption).
Is Valid HostnamePureRFC-952/1123-style hostname validation.

Credits

© Alpha XPalphaxp.net. Developed and maintained for UE 4.27–5.0+.