View RSS Feed

Java Socket

Socket programming and networking examples in Java.

  1. Class InetAddress

    by , 04-25-2012 at 11:27 PM
    Certain methods are provided by this class to access the IP addresses & hostnames.
    InetAddress objects are created by using these methods.

    Static InetAddress getLocalHost() throws UnknownHostException For the local machine, InetAddress is returned by this method.

    Static InetAddress getByName(String host) throws UnknownHostException For specified hostname, InetAddress object is returned by this method. Hostname could either be an IP like 121.1.28.54 or pneumonic ...
    Categories
    Tutorial