com.arunta.base.audio.streaming
Class StreamPacketReceiver

java.lang.Object
  extended by com.arunta.base.audio.streaming.StreamPacketReceiver

public class StreamPacketReceiver
extends java.lang.Object

Receiver for audio stream packets.

Uses UDP to listen for packets from remote senders.


Constructor Summary
StreamPacketReceiver(java.net.InetSocketAddress socketAddress)
          Initialises a packet receiver.
 
Method Summary
 void setPacketListener(StreamPacketListener packetListener)
           
 void startProcessing()
          Start an internal thread which will receive stream packets from a Total Recall VR system on a UDP socket and dispatch the packets to a registered StreamPacketListener, if any.
 void stopProcessing()
          Stops the internal thread that receives and dispatches packets to a registered StreamPacketListener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamPacketReceiver

public StreamPacketReceiver(java.net.InetSocketAddress socketAddress)
Initialises a packet receiver.

Note that the receiver will not actually receive packets until a call to startProcessing().

Parameters:
socketAddress - The socket to use to receive packets.
Method Detail

startProcessing

public void startProcessing()
                     throws java.io.IOException
Start an internal thread which will receive stream packets from a Total Recall VR system on a UDP socket and dispatch the packets to a registered StreamPacketListener, if any.

Throws:
java.io.IOException - On any problem with establishing a UDP socket.

stopProcessing

public void stopProcessing()
Stops the internal thread that receives and dispatches packets to a registered StreamPacketListener.

Note that the caller thread will block until the internal thread ends processing.


setPacketListener

public void setPacketListener(StreamPacketListener packetListener)


Copyright ©, 2005-2012 Prolancer Pty Ltd, Sydney Australia.