local.net
Class RtpSocket

java.lang.Object
  |
  +--local.net.RtpSocket

public class RtpSocket
extends java.lang.Object

RtpSocket implements a RTP socket for receiving and sending RTP packets.

RtpSocket is associated to a DatagramSocket that is used to send and/or receive RtpPackets.


Constructor Summary
RtpSocket(java.net.DatagramSocket datagram_socket)
          Creates a new RTP socket (only receiver)
RtpSocket(java.net.DatagramSocket datagram_socket, java.net.InetAddress remote_address, int remote_port)
          Creates a new RTP socket (sender and receiver)
 
Method Summary
 void close()
          Closes this socket
 java.net.DatagramSocket getDatagramSocket()
          Returns the RTP DatagramSocket
 void receive(RtpPacket rtpp)
          Receives a RTP packet from this socket
 void send(RtpPacket rtpp)
          Sends a RTP packet from this socket
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RtpSocket

public RtpSocket(java.net.DatagramSocket datagram_socket)
Creates a new RTP socket (only receiver)

RtpSocket

public RtpSocket(java.net.DatagramSocket datagram_socket,
                 java.net.InetAddress remote_address,
                 int remote_port)
Creates a new RTP socket (sender and receiver)
Method Detail

getDatagramSocket

public java.net.DatagramSocket getDatagramSocket()
Returns the RTP DatagramSocket

receive

public void receive(RtpPacket rtpp)
             throws java.io.IOException
Receives a RTP packet from this socket

send

public void send(RtpPacket rtpp)
          throws java.io.IOException
Sends a RTP packet from this socket

close

public void close()
Closes this socket