networking - Network communication without a centralized host. Is it possible? -


i have server , few clients, software-wise, , want client figure out ip address of server without referring specific database.

i had misconception udp until udp used port common identifier between servers , clients, wrong apparently.

requirement: want server broadcast message devices on network, once every 5 seconds or so. message contain ip of server.

software using such technique already: photo transfering app ios, called "photo transfer app" easy use because tells open app on mac , on iphone, , press "discover", , bam! devices have found each other. how?

how can requirement achieved?

edit googled bit. server host on 255.255.255.255and clients connect address solve problem?

according wikipedia article, 255.255.255.255 used broadcasting.

can confirm?

if use broadcast address (255.255.255.255) or network broadcast (like 192.168.1.255 network 192.168.1.xxx or in prefix notation 192.168.1.0/24). essential limitation: broadcast never leave network. host inside lan see broadcast message nobody else.

multicast mentioned null better because can leave network , pass through ip routers. feasible special network settings on routers (and require multicast routing capability on routers).

another technology without such limitation can use dynamic dns (server register via dns).


Comments