Search code examples
c#xamlip-addresslan

How to Find Available IP Addresses in LAN using C#


I was trying to develop a message chat application for LAN (Windows Store App) using XAML and C#. So, first of all how can I know, the people who are available in LAN based on their IP addresses?

Any sample code or idea to achieve this?


Solution

  • You can not rely on multicast using WinRT :(

    However you have 2 solutions :

    1. Using IP broadcast : send your bonjour message to 255.255.255.255
    2. Add a server node

    Note that solution 1 works only on LAN and may be limited by routers and gateways configurations.