Java Socket Address Get getPort(InetSocketAddress socket)

Here you can find the source of getPort(InetSocketAddress socket)

Description

get Port

License

Apache License

Declaration

public static String getPort(InetSocketAddress socket) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.net.InetSocketAddress;

public class Main {
    public static String getPort(InetSocketAddress socket) {
        return socket.getPort() + "";
    }//from   ww w  . j a  v  a 2 s  .c om
}

Related

  1. getIpAsString(SocketAddress address)
  2. getLocalAddress(Socket socket)
  3. getLocalSocketAddress(String host, int port)
  4. getNetworkVersion(InetSocketAddress address)
  5. getOffsettedAddress(InetSocketAddress isa, int offset)
  6. getPort(SocketAddress socketAddress)
  7. getRandomLoopbackInetSocketAddress(final int port)
  8. getRawAddress(InetSocketAddress inetSocketAddress)
  9. getSimpleIpport(SocketAddress remoteAddr)