object udp
- Source
- udp.scala
- Alphabetic
- By Inheritance
- udp
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- trait Connection [+A] extends AnyRef
-
case class
Packet
(origin: InetSocketAddress, bytes: ByteVector) extends Product with Serializable
A UDP packet, consisting of an origin IP and port, and a
ByteVectorpayload.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
eval[A](a: Task[A]): Process[Connection, A]
Evaluate a
Taskwithin a UDP-connectedProcess. -
def
eval_[A](a: Task[A]): Process[Connection, Nothing]
Evaluate and discard the result of a
Taskwithin a UDP-connectedProcess. -
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
lift[A](p: Process[Task, A]): Process[Connection, A]
Run a
Process[Task,A]within a UDP-connectedProcess. -
def
listen[A](port: Int, receiveBufferSize: Int = 1024 * 32, sendBufferSize: Int = 1024 * 32, reuseAddress: Boolean = true)(p: Process[Connection, A]): Process[Task, A]
Open a UDP socket on the specified port and run the given process
p. -
def
localAddress: Process[Connection, InetSocketAddress]
Returns a single-element stream containing the local address of the bound socket.
- def merge[A](a: Process[Connection, A], a2: Process[Connection, A])(implicit S: Strategy): Process[Connection, A]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
receive(maxPacketSize: Int, timeout: Option[Duration] = None): Process[Connection, Packet]
Receive a single UDP Packet.
Receive a single UDP Packet.
maxPacketSizecontrols the maximum number of bytes in the received. Seejava.net.DatagramSocket#receivefor information about what exceptions may be raised within the returned stream. -
def
receives(maxPacketSize: Int, timeout: Option[Duration] = None): Process[Connection, Packet]
Defined as
receive(maxPacketSize, timeout).repeat. -
def
send(to: InetAddress, destinationPort: Int, bytes: ByteVector): Process[Connection, Unit]
Defined as
send(new InetSocketAddress(to, destinationPort), bytes). -
def
send(to: InetSocketAddress, bytes: ByteVector): Process[Connection, Unit]
Send a single UDP Packet to the given destination.
Send a single UDP Packet to the given destination. Returns a single
Unit. Seejava.net.DatagramSocket#sendfor information about what exceptions may be raised within the returned stream. -
def
sends(to: InetAddress, destinationPort: Int, chunks: Process[Connection, ByteVector]): Process[Connection, Unit]
Defined as
sends(new InetSocketAddress(to, destinationPort), chunks). -
def
sends(to: InetSocketAddress, chunks: Process[Connection, ByteVector]): Process[Connection, Unit]
Defined as
chunks.flatMap { bytes => udp.send(to, bytes) } -
def
sends_(to: InetAddress, destinationPort: Int, chunks: Process[Connection, ByteVector]): Process[Connection, Nothing]
Defined as
sends(new InetSocketAddress(to, destinationPort), chunks).drain. -
def
sends_(to: InetSocketAddress, chunks: Process[Connection, ByteVector]): Process[Connection, Nothing]
Defined as
chunks.flatMap { bytes => udp.send(to, bytes) }.drain -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def wye[A, B, C](a: Process[Connection, A], b: Process[Connection, B])(y: Wye[A, B, C])(implicit S: Strategy): Process[Connection, C]
- object syntax