Overview  Package   Class  Tree  Index 

be.lassi.lanbox.udp
Class UdpReceiver

java.lang.Object
  extended by be.lassi.lanbox.udp.UdpReceiver

public class UdpReceiver
extends java.lang.Object

Receives and processes incoming UDP packets from the lanbox.


Constructor Summary
UdpReceiver(ConnectionPreferences properties)
          Constructs a new receiver.
 
Method Summary
 void close()
          Closes the receiver network connection.
 UdpPacket nextPacket()
          Reads a new packet from the UDP receive socket.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UdpReceiver

public UdpReceiver(ConnectionPreferences properties)
Constructs a new receiver.

Parameters:
properties - connection configuration information
Method Detail

close

public void close()
Closes the receiver network connection.


nextPacket

public UdpPacket nextPacket()
Reads a new packet from the UDP receive socket. This method gets called right after the previous update of the user interface for the previous packet was finished. We do not need to return a new packet immediately but we can drop all packets that arrive before the wait time is finished.

Returns:
the new packet or null when no packet is received within the timeout period

Overview  Package   Class  Tree  Index 
Lighting Assistant 1.2