JDK-4071389 : Need equivalent of getservbyname
  • Type: Enhancement
  • Status: Closed
  • Resolution: Fixed
  • Component: core-libs
  • Sub-Component: java.net
  • Priority: P5
  • Affected Version:
    1.1.3,1.1.4,1.1.5,1.1.8,1.2.0,1.4.0,1.4.2 1.1.3,1.1.4,1.1.5,1.1.8,1.2.0,1.4.0,1.4.2
  • OS: generic,solaris_2.5.1,solaris_8,windows_95
  • CPU: generic,x86,sparc
  • Submit Date: 1997-08-13
  • Updated Date: 2017-07-28
  • Resolved Date: 2017-07-28
Related Reports
Duplicate :  
Description
Name: rlT66838			Date: 08/12/97


When using the java.net classes for low level TCP/IP operations;
such as writing a server to implement a non Web related service,
there is a need to be able to get the port of a service.
The gethostbyname() and setservicebyname() C functions
are well-known examples. The InetAddress class has the getByName()
method, but we need a getServiceByName() method to allow client
programs to refer to the service by a published name, rather
than a hardcoded port address. This would also bring the net classes
more in line with the standard C implementation of sockets.

======================================================================

Comments
No recent activity or interest. Please re-open if there is future interest.
2017-07-28

WORK AROUND Name: rlT66838 Date: 08/12/97 ======================================================================
2004-06-11

EVALUATION An equivalent of getservbyname would be desirable - see comments. ###@###.### 2002-10-30
2002-10-30