'how to discover connected devices to the same router using websockets?

I am working on a project that I need to discover connected to the same network. Can you please guide me how to discover connected devices using web sockets



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source