The mmstream.connection.Connection interface is used to hide network type-specific
details from the rest of the application.
Its most important methods are the overloaded send() and receive() methods. The
destination address, to which a Connection object sends the data, is set or queried with
a pair of accessor functions, getRemoteAddress() and setRemoteAddress().
ConnectionControl objects and resource reservation mechanisms are not part of the
architecture's implementation up to now.
The mmstream.connection.ip.UDP_Connection class is built around the
DatagramSocket class provided by the JDK java.net package.
The package implements the DatagramSocket class by native C methods, which in turn use UDP
sockets provided by the operating system.
The send() method of the Connection
interface is implemented by constructing a java.net.DatagramPacket object from the
arguments to the send() method and sending this packet by means of the socket.
The receive() method is implemented by returning the data, which is received as
DatagramPacket from the socket, in an appropriate form, for example as a Chunk object.
The UDP_Multicast_Connection class is derived from the
UDP_Connection class, but uses a sun.net.MulticastSocket object instead of a
DatagramSocket object. The MulticastSocket object joins the IP multicast host group
specified by the destination address, which must be an IP multicast group address. Furthermore,
each UDP_Multicast_Connection object contains a TTL field, which determines the
transmission range of the transmitted DatagramPacket objects.