net.jolsrv2.comm
Class Receiver

java.lang.Object
  extended by net.jolsrv2.comm.Receiver
All Implemented Interfaces:
java.lang.Runnable

public class Receiver
extends java.lang.Object
implements java.lang.Runnable

The class listens on an Interface's DatagramSocket for incoming packets. The packets are received, parsed and put in the queue for parsed packets on the Interface.

Author:
Andreas Schjønhaug

Constructor Summary
Receiver(Interface iface)
          Constructor
 
Method Summary
 void halt()
           
 void run()
          Definition of the run method as required by the Runnable interface The method creates a loop listening for packet, trying to parse them as they arrive.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Receiver

public Receiver(Interface iface)
Constructor

Parameters:
iface - the belonging Interface
Method Detail

halt

public void halt()

run

public void run()
Definition of the run method as required by the Runnable interface The method creates a loop listening for packet, trying to parse them as they arrive. The successfully parsed packets are put in the respective Interface's parsed packets queue.

Specified by:
run in interface java.lang.Runnable
See Also:
PacketParser, Interface