oops. did you mean by API ?
then you need to get first the InetAddress of the ServerSocket by using the method getInetAddress().
the use this method of the InetAddress: getHostAddress() which return the
String you want.
or you can use this too:
InetAddress address=InetAddress.getLocalHost();
String ip=address.getHostAddress();
[ March 07, 2002: Message edited by: Roy Ben Ami ]