Can I bind a UDP socket to a port, but send to any other port?
Hi there,
I'm working on an application that needs to send out UDP packets to arbitrary ports (could be sending to anything from Port 1024 and up).
Due to firewall configuration on the server, I need to actually bind the UDP socket to a particular port (in this case 8585) but be able to send out packets to any port.
Is this possible? I'm getting errors, although the bind() on the UDP socket doesn't produce an error, so the machine appears happy with that.
I am getting an error with the sendTo function whenever I call it.
Just want to make sure I'm not going down a path which isn't possible.
Many thanks!