How to hole-punch the listen-server port

Hi. I’ve been working on this for a few days and can’t quite figure it out.

I am trying to open the ports for incoming WAN connections by using UDP hole-punching.

I believe I need to send periodic packets out of the same port the listen-server is using so that the port will be open for incoming messages.

I have created a UDP socket, but it cannot bind to the same port the listen-server is on, so I am unable to send a packet out that way.

I have tried to find any information about how to manually make the listen-server send a packet or anything outbound, but I have not been successful there. It seems to only sends messages to connected clients and does not have a way to be told to send data to an arbitrary destination.

I would appreciate any help on how to do this step, as I have been thinking myself in circles for a while now.

Thanks!