is there any example for this use case:
My device IP: 192.168.0.1
I need UDP communication working as client to server. My device would be server.
I am receiving packets from port 5000 and any IP within same network as my device. This packet arrives with source port (always same) 5001.
After I process incoming message, I have to send response to IP address from which I have got received request with source port set to 5000 (my receive port) and 5001 as destination port (port that I have get from request).
Is there any example for this? Do I need 2 sockets for this or one is enough? I have found example AN4644CW and there are two sockets for something familiar to my problem but when I have tried to change it for my needs, communication always got stuck. Currently I am using 2 sockets as it in example and closing and reopening them but it does not working.