Good way to send/receive UDP packets?

wjoe invalid at
Wed Jul 22 16:38:42 UTC 2020

On Wednesday, 22 July 2020 at 16:14:24 UTC, wjoe wrote:
> When receiving packets, the IP header contains the destination 
> address of your public IP (the router), which it will translate 
> to the local address according to the port forwarding setup.

Pardon me, I meant to say according to the current routing table 
Port Forwarding forwards all packets that match the defined 
criteria to the specified PC in the network.
A port forwarding rule isn't required for NAT to work. Sender and 
receiver both need to send a packet to each other. This will 
cause the router to add a rule and expect an answer on that port 
from the destination address.
When this packet arrives before the rule has been made it will be 
dropped (unless a port forwarding rule exists), so several 
packets may need to be sent for a successful punch-through.

More information about the Digitalmars-d-learn mailing list