I have made a client-server desktop application in java with following parts
- Server (Teacher)
- Client (Student)
Multiple Clients connect to Server using Server's IP Address and port.
But Server's IP address does not remains same and clients can not
connect to server anymore.
Can anyone tell that how to
1.make server IP address fixed so that it does not change
- when disconnected and reconnected to router
- when connected to another router
2.if above can not be accomplished how to broadcast changed IP address of server to clients
thanks in advance
At home I have achieved this by turning off the Dynamic Host Configuration Protocol (DHCP) on the switch/router so that the IP's are fixed.
Note that the IP for the server inside of your home/company network and the IP exposed outside of your network may be different.