How do clients locate servers in a client-server networking application?

  • Thread starter Thread starter ramollari
  • Start date Start date
  • Tags Tags
    Server
Click For Summary
SUMMARY

The discussion focuses on the methods for clients to locate servers in a client-server networking application built in Java. It highlights that users typically need to enter the server's IP address unless dynamic name service (DNIS) is utilized, allowing the use of the server name instead. The conversation emphasizes that servers generally do not use dynamic IPs and that the port number, which can be fixed as a constant in the application, is crucial for establishing a connection.

PREREQUISITES
  • Java programming for client-server applications
  • Understanding of multithreading in server environments
  • Knowledge of dynamic name service (DNIS)
  • Familiarity with network protocols and port management
NEXT STEPS
  • Research Java multithreading techniques for handling multiple clients
  • Learn about dynamic name service (DNIS) implementation in Java
  • Explore best practices for managing fixed port numbers in server applications
  • Investigate network configuration for static versus dynamic IP addresses
USEFUL FOR

Java developers, network engineers, and anyone involved in building or maintaining client-server applications.

ramollari
Messages
433
Reaction score
1
I'm trying to build a client-server networking application (in Java). There is a central server program (multithreaded, to handle multiple clients) and the client program. I don't know how the client is going to find the server. Does the user of the client program have to enter the IP address? What if the IP address is dynamic?
 
Computer science news on Phys.org
The client would have to enter the IP unless the IP is provided through DNIS, in which case you could use the server name. The same open call handles both forms.
Servers rarely use dynamic IPs. Lots of game playing if you do.
You also need to know the port the server is listening on.
 
NoTime said:
You also need to know the port the server is listening on.
Yes you're right, although the port number of the server application can remain fixed and can be coded as a constant in the program.
 

Similar threads

Replies
7
Views
3K
  • · Replies 9 ·
Replies
9
Views
5K
Replies
4
Views
3K
  • · Replies 29 ·
Replies
29
Views
6K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 39 ·
2
Replies
39
Views
8K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 22 ·
Replies
22
Views
5K