Code example for ServerSocket

Methods: getInetAddressgetLocalPort

		ServerSocket listener = iface.socket();
		assert (listener != null) : "TCPConvergenceLayer : dump_interface, socket is null";
		String text = String.format("\tlocal_addr: %s local_port: %s\n",
				listener.getInetAddress(), listener.getLocalPort());
	 * Parse the destination  IPaddress and the remote port 
	public boolean parse_nexthop (Link link, LinkParams lparams){
		TCPLinkParams params = (TCPLinkParams)(lparams);
	    assert(params != null);
	    params.remote_addr_ = link.dest_ip();
Connect your IDE to all the code out there  Get Codota for Java