o

akka.testkit

SocketUtil

object SocketUtil

Utilities to get free socket address.

Source
SocketUtil.scala
Linear Supertypes
Content Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SocketUtil
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait Protocol extends AnyRef

Value Members

  1. val RANDOM_LOOPBACK_ADDRESS: String
  2. def notBoundServerAddress(): InetSocketAddress
  3. def notBoundServerAddress(address: String): InetSocketAddress
  4. 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

  5. def temporaryLocalPort(udp: Boolean = false): Int

    returns

    A port on 'localhost' that is currently available

  6. 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

  7. def temporaryServerAddresses(numberOfAddresses: Int, hostname: String = RANDOM_LOOPBACK_ADDRESS, udp: Boolean = false): IndexedSeq[InetSocketAddress]
  8. def temporaryServerHostnameAndPort(interface: String = RANDOM_LOOPBACK_ADDRESS): (String, Int)
  9. def temporaryUdpIpv6Port(iface: NetworkInterface): Int
  10. object Both extends Protocol with Product with Serializable
  11. object Tcp extends Protocol with Product with Serializable
  12. object Udp extends Protocol with Product with Serializable