How to ignore your own broadcast udp packets

后端 未结 5 819
甜味超标
甜味超标 2020-12-11 02:29

For the following I\'m assuming one network card.

I have a component of my program which is designed to let others in the subnet know of its existence. For this, I\

5条回答
  •  难免孤独
    2020-12-11 02:43

    On linux, you can get the IP address of a given interface using ioctl with the SIOCGIFADDR option. I don't think this works for Windows, though. For that, you'll have to do something goofy like this.

提交回复
热议问题