Getting constant address instead of ephemeral one
So, I am developing a simple WakeOnLan program to turn the computer on and off ( using an agent ). And the thing works, but the problem is when trying to get an answer.
Code:
https://pastebin.com/WiupUPQZ
But when the agent receives any packet, I get an IP with an ephemeral port and when trying to answer I get an exception, however I have port forwarding for these computers in the router. How do I get the constant port in the IPEndPoint?
Pastebin
Agent.cs UdpClient client = new UdpClient(9); // UdpClie...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
0 Replies