com.arunta.base.audio.streaming
Class StreamPacketSender
java.lang.Object
com.arunta.base.audio.streaming.StreamPacketSender
public class StreamPacketSender
- extends java.lang.Object
Audio stream packet sender.
Uses UDP to send packets to a StreamPacketReceiver
that listens
on the specified socket.
Constructor Summary |
StreamPacketSender(java.net.InetSocketAddress socketAddress)
Creates an audio stream packet sender capable of sending stream packets
to a receiver via the specified socket. |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StreamPacketSender
public StreamPacketSender(java.net.InetSocketAddress socketAddress)
throws java.io.IOException
- Creates an audio stream packet sender capable of sending stream packets
to a receiver via the specified socket.
- Parameters:
socketAddress
- The socket to send packets to.
- Throws:
java.io.IOException
- On any problem with establishing a local UDP socket and a connection
to the remote client.
finalize
protected void finalize()
- Overrides:
finalize
in class java.lang.Object
sendPacket
public void sendPacket(StreamPacket packet)
throws java.io.IOException
- Send a packet to the remote receiver.
- Parameters:
packet
- The packet to send.
- Throws:
java.io.IOException
- If the packet can not be sent.
close
public void close()
Copyright ©, 2005-2012 Prolancer Pty Ltd, Sydney Australia.