sockets - Java Login Username on Remote Machine -
i'm working on simple file sharing program in lan networks using java. software uses socket ans serversocket classes send , receive to/from machines user knows ip addresses of. want improve software in way user can enter other's machine username instead of ip, example if user of other machine trying connect machine specific username, connection allowed.
a solution maintaining form of username -> ip (or hostname)
mapping. done dhcp server, that's bit of overkill (or impossible if cannot set dhcp server), recommend program maintains mapping itself.
to build mapping, try this: when host goes up, send lan broadcast message username notify presence. upon receiving notifications, other hosts register sender host's ip , username, answer respective user names , ip addresses.
Comments
Post a Comment