Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
getnamo committed Mar 29, 2021
2 parents 51cf93e + 9f2e106 commit fafbe51
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ Convenience ActorComponent UDP wrapper for Unreal Engine 4.
[![GitHub release](https://img.shields.io/github/release/getnamo/udp-ue4.svg)](https://github.com/getnamo/udp-ue4/releases)
[![Github All Releases](https://img.shields.io/github/downloads/getnamo/udp-ue4/total.svg)](https://github.com/getnamo/udp-ue4/releases)

This may not be the most sensible wrapper for your use case, but is meant to co-exist with https://github.com/getnamo/socketio-client-ue4 with similar workflow.
This may not be the most sensible wrapper for your use case, but is meant to co-exist with https://github.com/getnamo/socketio-client-ue4 with similar workflow.

Wraps built-in ue4 udp functionality as an actor component with both sending and receiving capabilities. Confirmed working with node.js [dgram](https://nodejs.org/api/dgram.html) (see [example echo server gist](https://gist.github.com/getnamo/8117fdc64209af086ce0337310c52a51) for testing).
Wraps built-in ue4 udp functionality as an actor component (_UDPComponent_) with both sending and receiving capabilities. Works through the c++ _FUDPNative_ wrapper which can be included and re-linked in a custom non actor component class if desired.

Confirmed working with node.js [dgram](https://nodejs.org/api/dgram.html) (see [example echo server gist](https://gist.github.com/getnamo/8117fdc64209af086ce0337310c52a51) for testing).

## Quick Install & Setup

Expand All @@ -23,12 +25,12 @@ Select an actor of choice. Add UDP component to that actor.
![add component](https://i.imgur.com/EnCiU4K.png)

Select the newly created component and modify any default settings
![defaults](https://i.imgur.com/wyYN2pU.png)

![defaults](https://user-images.githubusercontent.com/542365/112784196-dc49ea80-9005-11eb-9d2c-a53384168be1.png)

By default the udp actor component will auto open both send and receive sockets on begin play. If you're only interested in sending, untick should auto open receive; conversely untick auto open send if you're not interested in sending.

Also if you want to connect/listen on your own time either or both and connect manually via e.g. key event
Also if you want to connect/listen on your own time, untick either and connect manually via e.g. key event

![manual open receive](https://i.imgur.com/HkSvGCb.png)

Expand All @@ -54,14 +56,15 @@ which you can convert to convenient strings or structures via socket.io (optiona

#### Receiving on Bound Send port

Since v0.9.5 when you open a send port it will generate a bound send port which you can use to listen. This should help NAT piercing. To use this feature untick should auto open receive and open your receive socket on the send socket open event with the bound port.
Since v0.9.5 when you open a send socket it will generate a bound send port which you can use to listen for udp events on the receiving side. This should help NAT piercing due to expected behavior.

![open bound send port](https://user-images.githubusercontent.com/542365/112771022-7c8c1900-8fde-11eb-971e-e81c3d4e55cd.png)

or you can use _Should Open Receive To Bound Send Port_ with both auto open send and receive true and specify a receiving Ip for the bound port and it will automatically do this step for you
To use this feature can use _Should Open Receive To Bound Send Port_ which will cause any receive open to automatically bind to your send ip and send bound port.

![auto open bound send port](https://user-images.githubusercontent.com/542365/112778515-9129da80-8ff9-11eb-93a3-129c00a8da47.png)

Or if you want to manually do this you can untick _Should Auto Open Receive_ and then open with own settings on e.g. send socket open event with the bound port.

![open bound send port](https://user-images.githubusercontent.com/542365/112771022-7c8c1900-8fde-11eb-971e-e81c3d4e55cd.png)

### Reliable Stream

Expand Down

0 comments on commit fafbe51

Please sign in to comment.