[ Back ]

UE4 Plugin: ENet Wrapper  v1.0.0
[ Purchase on Unreal Engine Marketplace ]

Compatible with Unreal engine versions: 4.26.



A UE4 plugin wrapper for the ENet reliable UDP networking library. This plugin enables ENet support inside Unreal Engine blueprints. It supports processing of network events on a separate network thread

ENet was created by Lee Salzman as a relatively thin, simple and robust network communication layer on top of UDP (User Datagram Protocol). The primary feature it provides is optional reliable, in-order delivery of packets.


Features
  • Simple UDP networking inside Unreal engine blueprints
  • Multi-threading: network processing on a separate thread
  • All features offered by the ENet library


Creating an ENet Server

Use the ENetCreateServer node to create an ENet server instance that can accept connections from clients. Bind events to OnConnect, OnDisconnect, and OnReceive to handle the network events. As soon as the CreateENetServer node returns, the server is running and can accept connections. If ServiceOnTick is false, the Service function must be called for the created instance manually and regularly in order to process network events.

Creating an ENet Client

Use the ENetCreateClient node to create an ENet client instance that can connect to a server instance. Bind events to OnConnect, OnDisconnect, and OnReceive to handle the network events. If ServiceOnTick is false, the Service function must be called for the created instance manually and regularly in order to process network events.

Creating Packets To Send

Use the ENetCreatePacket node to create an ENet packet instance that any type of data can be written to. The packet can then be sent using the server or client instance SendPacket function(s).

Sending Struct Packets

A better way to send and receive packets is to use blueprint Structs for each message type and write the struct to the packet instead of writing all the individual variables that make up the struct separately.

Handling Packets

When handling packets, each packet should be read exactly as it was written to the packet. Peek can be used to see the contents of a packet buffer without moving the seek index.



Additional Screenshots



Change Log
v1.0.0 (07-09-21):
  • [Added] Initial release