All Packages This Package Class Hierarchy Class Search Index
Class edu.utah.janos.nodeos.pj_UDPLayer
java.lang.Object
|
+----edu.utah.janos.nodeos.pj_ProtocolLayer
|
+----edu.utah.janos.nodeos.pj_UDPLayer
class pj_UDPLayer
extends edu.utah.janos.nodeos.pj_ProtocolLayer
{
// Fields 3
private final DatagramPacket dp;
private final DatagramSocket ds;
private final Hashtable sockets;
// Constructors 1
pj_UDPLayer() throws SocketException;
// Methods 11
void attachGenerator(PacketGenerator);
void attachHandler(PacketHandler) throws IOException;
AddressSpec createAddress(String) throws PacketAddressFormatException;
PacketAddressMask createAddressMask();
void detachGenerator(PacketGenerator);
void detachHandler(PacketHandler);
void generatorReady(PacketGenerator);
String getID();
int getPacketLength();
void synchronousSend(PacketGenerator, pj_BufferHandle);
public String toString();
// Inner Classes 1
private static class pj_UDPLayer.SocketReader
}
UDPLayer is a protocol layer implementation that runs over UDP.
- Author:
-
Janos Ministry of Development
private final DatagramPacket dp
Datgram wrapper for sending packets. The stupid empty
buffer is replaced with the pj_BufferHandle's buffer right
before the send.
private final DatagramSocket ds
Output UDP socket for sending packets.
private final Hashtable sockets
The table of sockets that we have open for reading, organized by
port number.
pj_UDPLayer() throws SocketException
public String toString()
- Overrides:
- toString in class Object
String getID()
- Overrides:
- getID in class pj_ProtocolLayer
int getPacketLength()
- Overrides:
- getPacketLength in class pj_ProtocolLayer
AddressSpec createAddress(String addr) throws PacketAddressFormatException
- Overrides:
- createAddress in class pj_ProtocolLayer
PacketAddressMask createAddressMask()
- Overrides:
- createAddressMask in class pj_ProtocolLayer
void attachHandler(PacketHandler ph) throws IOException
void detachHandler(PacketHandler ph)
void attachGenerator(PacketGenerator pg)
void synchronousSend(PacketGenerator pg,
pj_BufferHandle bh)
Synchronous send a packet, blocking until the send
completes.
void generatorReady(PacketGenerator pg)
Signal to UDP layer that asynchronous packets are
available. We just do a synchronous send. :)
void detachGenerator(PacketGenerator pg)
All Packages This Package Class Hierarchy Class Search Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7