IzSockets

izumi.fundamentals.platform.network.IzSockets
object IzSockets

Utilities to get free socket address.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
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