Package org.apache.pekko.testkit
Class SocketUtil$
java.lang.Object
org.apache.pekko.testkit.SocketUtil$
Utilities to get free socket address.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final SocketUtil$Static reference to the singleton instance of this Scala object.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionnotBoundServerAddress(String address) inttemporaryLocalPort(boolean udp) inttemporaryLocalPort(SocketUtil.Protocol protocol) Find a free local post on 'localhost' that is available on the given protocol If both UDP and TCP need to be free specifyBothbooleantemporaryServerAddress(String address, boolean udp) booleanscala.collection.immutable.IndexedSeq<InetSocketAddress>temporaryServerAddresses(int numberOfAddresses, String hostname, boolean udp) booleantemporaryServerHostnameAndPort(String interface_) int
- 
Field Details- 
MODULE$Static reference to the singleton instance of this Scala object.
 
- 
- 
Constructor Details- 
SocketUtil$public SocketUtil$()
 
- 
- 
Method Details- 
RANDOM_LOOPBACK_ADDRESS
- 
temporaryLocalPortpublic int temporaryLocalPort(boolean udp) - Returns:
- A port on 'localhost' that is currently available
 
- 
temporaryLocalPortFind a free local post on 'localhost' that is available on the given protocol If both UDP and TCP need to be free specifyBoth
- 
temporaryLocalPort$default$1public boolean temporaryLocalPort$default$1()
- 
temporaryServerAddress- Parameters:
- address- host address. If not set, a loopback IP from the 127.20.0.0/16 range is picked
- udp- if true, select a port that is free for running a UDP server. Otherwise TCP.
- Returns:
- an address (host+port) that is currently available to bind on
 
- 
temporaryServerAddress$default$1
- 
temporaryServerAddress$default$2public boolean temporaryServerAddress$default$2()
- 
temporaryServerAddressespublic scala.collection.immutable.IndexedSeq<InetSocketAddress> temporaryServerAddresses(int numberOfAddresses, String hostname, boolean udp) 
- 
temporaryServerAddresses$default$2
- 
temporaryServerAddresses$default$3public boolean temporaryServerAddresses$default$3()
- 
temporaryServerHostnameAndPort
- 
temporaryServerHostnameAndPort$default$1
- 
temporaryUdpIpv6Port
- 
notBoundServerAddress
- 
notBoundServerAddress
 
-