You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No, I haven't done it like that using only one socket before. What I have done, is opened a separate socket on each interface, and then the receiving address is determined by which socket it comes in on. Using multiple sockets will probably be more portable, but otherwise, the Stack Overflow solution might be simpler and I suspect would perform slightly better (no socket multiplexing).
Hi Lewis,
Have you ever done this with a UDP package?
https://stackoverflow.com/questions/5281409/get-destination-address-of-a-received-udp-packet
Looks like you can't use recvfrom and have to switch to recvmsg to use IP_PKTINFO
I'll dig into the book again.
Thanks for reading.
Gavin.
The text was updated successfully, but these errors were encountered: