I'm creating an application that uses Websocket to connect two devices to an internal network, but for this to be done, the user must enter the Node server address js into a text field so that it can be used to create a Websocket connection between the HTML5 application and the Node Server js.
But if it were possible, I'd like to eliminate the need to enter the address to create this connection, I thought it was impossible at first, I did not actually consider this at first until I got in touch with Apple's Keynote application, connect two devices on the same network so you can control the slide show with your iPad while your Mac designs the presentation, for example.
In Keynote, to create this connection it is only necessary that the two devices are connected in the same network and using the same application at the same time, without the need to type any IP, this made me intrigued and gave me some hope of that the same can be done with Javascript and Node js. I know they might use some technology or pattern that I do not have access to, but I'd like to at least know how this was done. Theories that can work theoretically are also welcome.