IzSockets

izumi.fundamentals.platform.network.IzSockets
See theIzSockets companion trait
object IzSockets extends IzSockets

Utilities to get free socket address.

Attributes

Companion
trait
Graph
Supertypes
trait IzSockets
class Object
trait Matchable
class Any
Show all
Self type
IzSockets.type

Members list

Value members

Concrete methods

def notBoundServerAddress(address: String): InetSocketAddress
def notBoundServerAddress(): InetSocketAddress
def temporaryLocalPort(udp: Boolean = ...): Int

Attributes

Returns

A port on 'localhost' that is currently available

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

def temporaryServerAddresses(numberOfAddresses: Int, hostname: String = ..., udp: Boolean = ...): IndexedSeq[InetSocketAddress]
def temporaryServerHostnameAndPort(interface: String = ...): (String, Int)
def temporaryUdpIpv6Port(iface: NetworkInterface): Int

Concrete fields