Best code examples for Java 8 InetSocketAddress class (java.net.InetSocketAddress)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 InetSocketAddress class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Java 8 InetSocketAddress examples from Open Source projects
This code example shows how to use the following methods: getHostString, getPort
58:	InetSocketAddress socketAddress = new InetSocketAddress(ipAddress.getIpAddress(), ipAddress.getPort()); 
-
61:	name = String.format("%s:%s", socketAddress.getHostString(), socketAddress.getPort()); 
-
63:	node = new AddressableNode(address, name, socketAddress); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods:
40:	new InetSocketAddress("127.0.0.1", 12345); 
41:	udp.tell(UdpConnectedMessage.connect(handler, remoteAddr), getSelf()); 
-
49:	udp.tell(UdpConnectedMessage.connect(handler, remoteAddr, localAddr, options), getSelf()); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getHostName, getPort
71:	InetSocketAddress addr = new InetSocketAddress(0); 
72:	System.err.println(addr.getHostName() + addr.getPort()); 
-
77:	server = 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
49:	this(new InetSocketAddress(hostname, port)); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
130:	SocketAddress socketAddress = new InetSocketAddress(localhost, 1); 
-
134:	when(this.factory.createDatagramSocket("test", socketAddress)).thenReturn(socket3); 
-
139:	DatagramSocket result3 = this.subject.createDatagramSocket("test", socketAddress); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getHostName, getPort
83:	this( new InetSocketAddress( addr , defaultPort() ) ); 
-
100:	_host = addr.getHostName(); 
101:	_port = addr.getPort(); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getHostName, getPort
77:	InetSocketAddress addr = new InetSocketAddress(0); 
78:	System.err.println(addr.getHostName() + addr.getPort()); 
-
83:	server = 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: getAddress, getPort
37:	return node.getSocketAddress().getAddress().getHostAddress().equals(this.address.getAddress().getHostAddress()) && (node.getSocketAddress().getPort() == this.address.getPort()); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
81:	_factory = new NIOServerCnxn.Factory(new InetSocketAddress(port)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
44:	TcpMessage.bind(getSelf(), new InetSocketAddress("localhost", 0), 100), 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
50:	InetSocketAddress address2 = new InetSocketAddress("0.0.0.0", 0); 
51:	Server.bind(socket2, address2, 10, conf, "TestRange"); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getHostName, getPort
89:	.setHostname(addr.getHostName()) 
90:	.setPort(addr.getPort()) 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
113:	InetSocketAddress nnAddr = new InetSocketAddress("localhost", cluster.getNameNodePort()); 
114:	return new DFSClient(nnAddr, conf); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getAddress, getPort
45:	socket.connect(new InetSocketAddress(remoteAddress.getAddress().getHostAddress(), remoteAddress.getPort())); 
46:	Log.d( "RtpSocket", "Connected to: " + remoteAddress.getAddress().getHostAddress() ); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
18:	SocketAddress localhost = new InetSocketAddress("localhost", 22133); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
72:	socketAddress = new InetSocketAddress(inetAddress,8000); 
73:	Assert.assertEquals("[::1]:8000", NetworkUtils.formatAddress(socketAddress)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
106:	socket.bind(new InetSocketAddress(host, bindPort)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
60:	NIOServerCnxnFactory.createFactory(new InetSocketAddress(this.port), this.maxConnections); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getAddress, getPort
145:	if (localServiceAddress.getAddress().isAnyLocalAddress()) { 
-
147:	addr.getPort() == localServiceAddress.getPort()) { 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
55:	return new InetSocketAddress(getLocalAddress(), getPort()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getAddress, getPort
91:	Assert.assertEquals(port, remoteAddress.getPort()); 
92:	Assert.assertEquals(InetAddress.getByAddress(ipAddr), remoteAddress.getAddress()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getPort
75:	return socketAddress.getPort(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: toString
75:	throw new TTransportException("Could not create ServerSocket on address " + bindAddr.toString() + "."); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: toString
51:	InetSocketAddress inet0 = new InetSocketAddress("0.0.0.0", _portNumber); 
52:	bootstrap.bind(inet0); 
-
54:	log.info("SAPO-SSL-BROKER  Listening on: '{}'.", inet0.toString()); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
90:	configuration.setBindAddress(new InetSocketAddress("127.0.0.1", PORT)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getAddress, getHostName, getPort
25:	InetAddress addr = value.getAddress(); 
26:	String str = addr == null ? value.getHostName() : addr.toString().trim(); 
-
39:	jgen.writeString(str + ":" + value.getPort()); 
-
48:	typeSer.writeTypeSuffixForScalar(value, jgen); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getHostName, getPort
144:	final int nbSentBytes = channel.send(buff, address); 
-
151:	address.getHostName(), address.getPort(), nbSentBytes, data.length)); 
-
157:	String.format("Could not send stat %s to host %s:%d", stat, address.getHostName(), 
158:	address.getPort()), e); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
110:	_bootstrap.bind(new InetSocketAddress(_port)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getAddress, getHostName, getPort, isUnresolved
165:	if (iaddr.isUnresolved()) 
-
167:	new InetSocketAddress(iaddr.getHostName(), 
168:	iaddr.getPort() - 10); 
-
171:	new InetSocketAddress(iaddr.getAddress(), iaddr.getPort() - 10); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getHostName
66:	acceptor.bind(this.addr, new ServerSessionHandler(cache, memcachedVersion, verbose, idleTime)); 
-
69:	logger.info("Listening on " + String.valueOf(addr.getHostName()) + ":" + this.port); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
132:	socket.connect(new InetSocketAddress(host, port), timeout); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
52:	return new AddressableNode(jgroupsAddress, name, new InetSocketAddress(InetAddress.getByAddress(address), port)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
55:	bootstrap.bind(new InetSocketAddress(port)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getPort
88:	assert addr.getPort() != 0; 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getAddress, getPort
104:	byte[] addrBytes = ipAddr.getAddress().getAddress(); 
-
106:	int port = ipAddr.getPort(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
88:	socket.connect(new InetSocketAddress(host, port)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
114:	socket.connect(new InetSocketAddress(address, port), timeout); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getHostName, getPort
650:	return addr.getHostName() + ":" + addr.getPort(); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
122:	return new InetSocketAddress( 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods:
91:	socket.connect(new InetSocketAddress(host, port)); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getHostName, getPort
177:	LocalPortForwarder.Parameters params = new LocalPortForwarder.Parameters("localhost", localSocket.getLocalPort(), remoteAddress.getHostName(), 
178:	remoteAddress.getPort()); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods:
244:	return new InetSocketAddress(sourceAddress, absoluteSourcePort); 
Full Snippet Info
7
CodeRank
Related Java 8 InetSocketAddress Questions & Answers:
See Code Examples for Java 8 InetSocketAddress Methods: