Socket
Provides the ability to read/write from a UDP socket in the effect
F.To construct a
Socket, use the methods in the fs2.io.udp package object.Value members
Methods
Reads a single packet from this udp socket.
If
if read was not satisfied in given timeout.
timeout is specified, then resulting F will fail with java.nio.channels.InterruptedByTimeoutExceptionif read was not satisfied in given timeout.
Reads packets received from this udp socket.
Note that multiple
amount of messages.
reads may execute at same time, causing each evaluation to receive fairamount of messages.
If
if a read was not satisfied in given timeout.
timeout is specified, then resulting stream will fail with java.nio.channels.InterruptedByTimeoutExceptionif a read was not satisfied in given timeout.
- Returns
-
stream of packets
Write a single packet to this udp socket.
If
if write was not completed in given timeout.
timeout is specified, then resulting F will fail with java.nio.channels.InterruptedByTimeoutExceptionif write was not completed in given timeout.
- Value Params
- packet
-
Packet to write
Writes supplied packets to this udp socket.
If
if a write was not completed in given timeout.
timeout is specified, then resulting pipe will fail with java.nio.channels.InterruptedByTimeoutExceptionif a write was not completed in given timeout.
Joins a multicast group on a specific network interface.
- Value Params
- group
-
address of group to join
- interface
-
network interface upon which to listen for datagrams