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* client = NewObject<UUDPClient>();
Nodes
Is Open
- Return true if socket is open.
𝑓
Is Open
Return Value
Local Endpoint
- Get the local endpoint of the socket. Use this function only after open connection.
𝑓
Local Endpoint
Return Value
Remote Endpoint
- Get the remote endpoint of the socket. Use this function only after open connection.
𝑓
Remote Endpoint
Return Value
Get Error Code
- Return a struct of the latest error code returned by asio.
𝑓
Get Error Code
Return Value
Set Recv Buffer Size
- Set receive buffer size in bytes
𝑓
Set Recv Buffer Size
Target is UDPClient
Target
Value
Get Max Send Buffer Size
- Get receive buffer size in bytes
𝑓
Get Recv Buffer Size
Target is UDPClient
Target
Return Value
Send
- Broadcasts a string to an specific endpoint.
- It returns false if socket is closed or if buffer is empty.
𝑓
Send
Target is UDPClient
Target
Message
Callback
Return Value
On Message Sent
Custom Event
Error Code
Bytes Sent
Send Buffer
- Broadcasts a buffer to an specific endpoint.
- It returns false if socket is closed or if buffer is empty.
𝑓
Send Buffer
Target is UDPClient
Target
Buffer
Callback
Return Value
On Message Sent
Custom Event
Error Code
Bytes Sent
Connect
- Listen for datagram messages on a named port and address.
- It returns false if socket is already open or if asio return any error code during the bind.
𝑓
Connect
Target is UDPClient
Target
Bind Opts
Return Value
Close
- Close the underlying socket and stop listening for data on it. 'on_close' event will be triggered.
𝑓
Close
Target is UDPClient
Target
Events
On Connected
- Event triggered when a connection is estabilished.
Bind Event to On Connected
Target
Event
On Connected
Custom Event
On Message
- Event triggered when socket send or receive data.
Bind Event to On Message
Target
Event
On Message
Custom Event
Buffer
Bytes Recvd
On Close
- Event triggered when socket is closed.
Bind Event to On Close
Target
Event
On Close
Custom Event
On Error
- Event triggered if any error occur during async process.