SocketUtil

org.apache.pekko.testkit.SocketUtil$
object SocketUtil

Utilities to get free socket address.

Attributes

Source
SocketUtil.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
SocketUtil.type

Members list

Type members

Classlikes

case object Both extends Protocol

Attributes

Source
SocketUtil.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Protocol
class Object
trait Matchable
class Any
Show all
Self type
Both.type
sealed trait Protocol

Attributes

Source
SocketUtil.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Both.type
object Tcp.type
object Udp.type
case object Tcp extends Protocol

Attributes

Source
SocketUtil.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Protocol
class Object
trait Matchable
class Any
Show all
Self type
Tcp.type
case object Udp extends Protocol

Attributes

Source
SocketUtil.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Protocol
class Object
trait Matchable
class Any
Show all
Self type
Udp.type

Value members

Concrete methods

def notBoundServerAddress(address: String): InetSocketAddress

Attributes

Source
SocketUtil.scala
def notBoundServerAddress(): InetSocketAddress

Attributes

Source
SocketUtil.scala

Attributes

Returns

A port on 'localhost' that is currently available

Source
SocketUtil.scala
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

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

Attributes

Source
SocketUtil.scala
def temporaryServerAddress(address: String, udp: Boolean): InetSocketAddress

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

Attributes

Returns

an address (host+port) that is currently available to bind on

Source
SocketUtil.scala
def temporaryServerAddresses(numberOfAddresses: Int, hostname: String, udp: Boolean): IndexedSeq[InetSocketAddress]

Attributes

Source
SocketUtil.scala

Attributes

Source
SocketUtil.scala
def temporaryUdpIpv6Port(iface: NetworkInterface): Int

Attributes

Source
SocketUtil.scala

Concrete fields

Attributes

Source
SocketUtil.scala