object SocketUtil
Ordering
- Alphabetic
- By Inheritance
Inherited
- SocketUtil
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- val RANDOM_LOOPBACK_ADDRESS: String
- def notBoundServerAddress(): InetSocketAddress
- def notBoundServerAddress(address: String): InetSocketAddress
- def temporaryLocalPort(protocol: Protocol): Int
Find a free local post on 'localhost' that is available on the given protocol If both UDP and TCP need to be free specify
Both
- def temporaryLocalPort(udp: Boolean = false): Int
- returns
A port on 'localhost' that is currently available
- def temporaryServerAddress(address: String = RANDOM_LOOPBACK_ADDRESS, udp: Boolean = false): InetSocketAddress
- 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
- def temporaryServerAddresses(numberOfAddresses: Int, hostname: String = RANDOM_LOOPBACK_ADDRESS, udp: Boolean = false): IndexedSeq[InetSocketAddress]
- def temporaryServerHostnameAndPort(interface: String = RANDOM_LOOPBACK_ADDRESS): (String, Int)
- def temporaryUdpIpv6Port(iface: NetworkInterface): Int
- case object Both extends Protocol with Product with Serializable
- case object Tcp extends Protocol with Product with Serializable
- case object Udp extends Protocol with Product with Serializable