is-centre / udp-ue4-plugin-win64

A simple UDP communication plugin based on freely available code
MIT License
50 stars 20 forks source link

Possibility to check if UDP is connected #11

Closed NeumeisterGit closed 1 year ago

NeumeisterGit commented 1 year ago

Hello :-) Is there any possibility (either in C++ or blueprint) if UDP is connected to a host when I want to receive? Or just the function "is new data ready"?

I have to unlock some constraints in unreal engine but first, when UDP is connected and I can receive data even if there are no datas at the moment...

extall commented 1 year ago

UDP is a conectionless protocol, unlike TCP. There is no handshakes or keepalives. The strategy is “send the packet and hope for the best”.

To make a “connected to host” scenario, you will need to implement a protocol to periodically check, if new packets have arrived. This is not presently seen as a core function of the plugin (you have Epic's complete server solution for that), so I am closing this issue. It may be reopened, if future developments necessitate it.