edu.rit.m2mp.udp
Class UDPUnicastChannel

java.lang.Object
  extended by edu.rit.m2mp.Channel
      extended by edu.rit.m2mp.udp.UDPChannel
          extended by edu.rit.m2mp.udp.UDPUnicastChannel

public class UDPUnicastChannel
extends UDPChannel

Class UDPUnicastChannel provides a point-to-point M2MP Channel that uses UDP datagrams to transport M2MP packets. Each UDP datagram is sent to one host at a certain IP address and port number. Thus, a UDPUnicastChannel provides an M2MP "tunnel" between two hosts.

The following parameters from the M2MP properties file are used to configure a UDPUnicastChannel. See class M2MPProperties for further information.


Field Summary
 
Fields inherited from class edu.rit.m2mp.Channel
myPacketPool
 
Constructor Summary
UDPUnicastChannel(PacketPool thePacketPool)
          Construct a new UDP unicast channel.
 
Method Summary
 void transmitPacket(Packet thePacket)
          Send the given M2MP packet via this UDP channel.
 
Methods inherited from class edu.rit.m2mp.udp.UDPChannel
receivePacket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UDPUnicastChannel

public UDPUnicastChannel(PacketPool thePacketPool)
Construct a new UDP unicast channel. To receive incoming packets, the channel implementation will obtain Packet objects from the given PacketPool.

Parameters:
thePacketPool - Packet pool.
Throws:
NullPointerException - (unchecked exception) Thrown if thePacketPool is null.
M2MPInitializationException - (unchecked exception) Thrown if the UDP unicast channel cannot be initialized.
Method Detail

transmitPacket

public void transmitPacket(Packet thePacket)
                    throws IOException
Send the given M2MP packet via this UDP channel.

Overrides:
transmitPacket in class UDPChannel
Parameters:
thePacket - M2MP packet to be sent.
Throws:
IOException - Thrown if an I/O error occurred.


Copyright © 2001-2006 by Alan Kaminsky. All rights reserved. Send comments to ark­@­cs.rit.edu.