public class StreamPacketReceiver
extends java.lang.Object
Uses UDP to listen for packets from remote senders.
Constructor and Description |
---|
StreamPacketReceiver(java.net.InetSocketAddress socketAddress)
Initialises a packet receiver.
|
Modifier and Type | Method and Description |
---|---|
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 . |
public StreamPacketReceiver(java.net.InetSocketAddress socketAddress)
Note that the receiver will not actually receive packets until a call to
startProcessing()
.
socketAddress
- The socket to use to receive packets.public void startProcessing() throws java.io.IOException
StreamPacketListener
, if any.java.io.IOException
- On any problem with establishing a UDP socket.public void stopProcessing()
StreamPacketListener
.
Note that the caller thread will block until the internal thread ends processing.
public void setPacketListener(StreamPacketListener packetListener)
Copyright ©, 2005-2019 Prolancer Pty Ltd, Sydney Australia.