public class StreamPacketSender
extends java.lang.Object
Uses UDP to send packets to a StreamPacketReceiver
that listens
on the specified socket.
Constructor and Description |
---|
StreamPacketSender(java.net.InetSocketAddress socketAddress)
Creates an audio stream packet sender capable of sending stream packets
to a receiver via the specified socket.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
finalize() |
void |
sendPacket(StreamPacket packet)
Send a packet to the remote receiver.
|
public StreamPacketSender(java.net.InetSocketAddress socketAddress) throws java.io.IOException
socketAddress
- The socket to send packets to.java.io.IOException
- On any problem with establishing a local UDP socket and a connection
to the remote client.protected void finalize()
finalize
in class java.lang.Object
public void sendPacket(StreamPacket packet) throws java.io.IOException
packet
- The packet to send.java.io.IOException
- If the packet can not be sent.public void close()
Copyright ©, 2005-2012 Prolancer Pty Ltd, Sydney Australia.