Class/Object

monix.nio.udp

TaskDatagramChannel

Related Docs: object TaskDatagramChannel | package udp

Permalink

abstract class TaskDatagramChannel extends AnyRef

A Task based asynchronous channel for reading, writing, and manipulating an UDP socket.

On the JVM this is a wrapper around java.nio.channels.DatagramChannel

Example:
  1. val ch = TaskDatagramChannel()
    ch
      .send(Packet("Hello world!".getBytes("UTF-8")), new InetSocketAddress("localhost", 2115)))
      .map { len =>
        println(len)
        ch.close()
      }
      .runAsync
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TaskDatagramChannel
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TaskDatagramChannel()

    Permalink

Abstract Value Members

  1. abstract val asyncDatagramChannel: AsyncDatagramChannel

    Permalink

    $asyncSocketChannelDesc

    $asyncSocketChannelDesc

    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def bind(local: InetSocketAddress): Task[Unit]

    Permalink

    Binds the channel's socket to a local address

    Binds the channel's socket to a local address

    local

    the local address to bind the socket, or null to bind to an automatically assigned socket address

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def close(): Task[Unit]

    Permalink

    $closeDesc

  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. def localAddress(): Task[Option[InetSocketAddress]]

    Permalink

    Asks the socket address that this channel's socket is bound to

  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def receive(maxSize: Int, timeout: FiniteDuration): Task[Option[Packet]]

    Permalink

    Receives a packet via this channel.

    Receives a packet via this channel. If a datagram is not available after the timeout then this method returns scala.None.

    maxSize

    if the value is smaller than the size required to hold the datagram, then the remainder of the datagram is silently discarded.

    timeout

    the receive timeout

    returns

    the packet, or scala.None if no datagram was available before timeout

  19. def send(packet: Packet): Task[Int]

    Permalink

    Sends a datagram via this channel

    Sends a datagram via this channel

    packet

    the packet to be sent

  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped