All Packages  This Package  Class Hierarchy  Class Search  Index

Inner Class edu.utah.janos.nodeos.UDPLayer.SocketReader
java.lang.Object
   |
   +----edu.utah.janos.nodeos.UDPLayer.SocketReader

  Summary

private static class  UDPLayer.SocketReader
     extends java.lang.Object
     implements java.lang.Runnable
{
          // Fields 3
     private DatagramSocket ds;
     private Vector masks;
     private int users;

          // Constructors 1
     SocketReader(int) throws SocketException;

          // Methods 4
     void addHandler(PacketHandler);
     private PacketHandler matchMask(DatagramPacket);
     boolean remHandler(PacketHandler);
     public void run();
}

Class that takes care of reading sockets and calling any associated packet handlers.




  Fields

· masks

Summary  |  Top

   private Vector masks

Vector of packet handlers attached to this socket.


· ds

Summary  |  Top
   private DatagramSocket ds


· users

Summary  |  Top
   private int users


  Constructors

· SocketReader

Summary  |  Top

   SocketReader(int port)  throws SocketException


  Methods

· matchMask

Summary  |  Top
   private PacketHandler matchMask(DatagramPacket dp) 

Find a packet handler that matches the given packet, we just check the source masks of each handler.



· addHandler

Summary  |  Top
   void addHandler(PacketHandler ph) 

Add a packet handler to this socket.



· remHandler

Summary  |  Top
   boolean remHandler(PacketHandler ph) 

Remove a packet handler from this socket.



· run

Summary  |  Top
   public void run() 
Implements:
run in interface Runnable


All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7