Internet Protocol
Unreal Engine Plugin

UDP Client

How to use UDP client class

References

#include "UDP/UDPClient.h"

How to use

Blueprint: search by GetInternetProtocolSubsystem and call CreateUDPClient function

C++: Use the code bellow

#include "UDP/UDPClient.h"
 
UUDPClient* UdpClient = NewObject<UUDPClient>();

Nodes

Set Host

  • Set the adress and port of host UDP client

Get Socket

  • Get socket properties UDP client

Set Max Send Buffer Size

  • Set max size in bytes of send buffer UDP client

Get Max Send Buffer Size

  • Get max size in bytes of send buffer UDP client

Set Max Receive Buffer Size

  • Set max size in bytes of receive buffer UDP client

Get Max Receive Buffer Size

  • Get max size in bytes of receive buffer UDP client

Set Split Package

  • If the size of a message exceeds the maximum allowed size for the send buffer, it will be divided into smaller packets before being sent. UDP client

Get Split Package

  • Get if Split Package is enabled UDP client

Send Str

  • Send a string message
  • Return false if message is empty or socket is closed
  • Warning: If you’re using Windows, ensure that you are sending characters compatible with UTF-8 UDP client

Send Buffer

  • Send a buffer message
  • Return false if buffer is empty or socket is closed UDP client

Connect

  • Connect to the host
  • Return false if socket is already connected UDP client

Close

  • Close connection UDP client

Get Error Code

  • Get latest error code UDP client

Events

On Connected

  • Event triggered when a connection is estabilished UDP client

On Bytes Transferred

  • Event triggered when socket send or receive data UDP client

On Message Sent

  • Event triggered when a message is sent UDP client

On Message Received

  • Event triggered when a message is received UDP client

On Close

  • Event triggered when socket is closed UDP client

On Error

  • Event triggered if any error occur during async process UDP client