DatagramSocket

trait DatagramSocket[F[_]] extends DatagramSocketPlatform[F]

Provides the ability to read/write from a UDP socket in the effect F.

Companion
object
trait DatagramSocketPlatform[F]
class Object
trait Matchable
class Any

Type members

Classlikes

trait GroupMembership extends GroupMembershipPlatform

Result of joining a multicast group on a UDP socket.

Result of joining a multicast group on a UDP socket.

Value members

Abstract methods

def join(join: MulticastJoin[IpAddress], interface: NetworkInterface): F[GroupMembership]

Joins a multicast group on a specific network interface.

Joins a multicast group on a specific network interface.

Value Params
interface

network interface upon which to listen for datagrams

join

group to join

def localAddress: F[SocketAddress[IpAddress]]

Returns the local address of this udp socket.

Returns the local address of this udp socket.

def read: F[Datagram]

Reads a single datagram from this udp socket.

Reads a single datagram from this udp socket.

def reads: Stream[F, Datagram]

Reads datagrams received from this udp socket.

Reads datagrams received from this udp socket.

Note that multiple reads may execute at same time, causing each evaluation to receive fair amount of messages.

Returns

stream of datagrams

def write(datagram: Datagram): F[Unit]

Writes a single datagram to this udp socket.

Writes a single datagram to this udp socket.

Value Params
datagram

datagram to write

def writes: (F, Datagram) => INothing

Writes supplied datagrams to this udp socket.

Writes supplied datagrams to this udp socket.