Java Socket Address Get createInetSocketAddress(String ip, int port)

Here you can find the source of createInetSocketAddress(String ip, int port)

Description

create Inet Socket Address

License

Open Source License

Declaration

public static InetSocketAddress createInetSocketAddress(String ip,
            int port) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.net.InetSocketAddress;

public class Main {
    public static InetSocketAddress createInetSocketAddress(String ip,
            int port) {
        InetSocketAddress address = null;
        if (ip == null) {
            address = new InetSocketAddress(port);
        } else {//  w w  w.j  ava 2  s  .c o  m
            address = new InetSocketAddress(ip, port);
        }
        return address;
    }
}

Related

  1. create(SocketAddress address, SocketAddress port)
  2. createBoundServerSocket(final SocketAddress socketAddress)
  3. createClientSocket(InetSocketAddress site)
  4. createHttpFields(InetSocketAddress endpoint)
  5. createInetSocketAddress(String address)
  6. describe(InetSocketAddress localAddress)
  7. encodedStringToInetSocketAddress(String str)
  8. extractClientAddress(SocketAddress remoteAddress)
  9. extractHostAddr(InetSocketAddress address)