public class JingleNodesCandidateDatagramSocket
extends java.net.DatagramSocket
Constructor and Description |
---|
JingleNodesCandidateDatagramSocket(JingleNodesCandidate jingleNodesCandidate,
org.ice4j.TransportAddress localEndPoint)
Initializes a new JingleNodesdCandidateDatagramSocket instance
which is to be the socket of a specific
JingleNodesCandidate.
|
Modifier and Type | Method and Description |
---|---|
java.net.InetAddress |
getLocalAddress()
Gets the local address to which the socket is bound.
|
int |
getLocalPort()
Returns the port number on the local host to which this socket is bound.
|
java.net.InetSocketAddress |
getLocalSocketAddress()
Returns the address of the endpoint this socket is bound to, or
null if it is not bound yet.
|
void |
receive(java.net.DatagramPacket p)
Receives a DatagramPacket from this socket.
|
void |
send(java.net.DatagramPacket p)
Sends a datagram packet from this socket.
|
bind, close, connect, connect, disconnect, getBroadcast, getChannel, getInetAddress, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoTimeout, getTrafficClass, isBound, isClosed, isConnected, setBroadcast, setDatagramSocketImplFactory, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSoTimeout, setTrafficClass
public JingleNodesCandidateDatagramSocket(JingleNodesCandidate jingleNodesCandidate, org.ice4j.TransportAddress localEndPoint) throws java.net.SocketException
jingleNodesCandidate
- the JingleNodesCandidate which is to
use the new instance as the value of its socket propertylocalEndPoint
- TransportAddress of the Jingle Nodes relay
where we will send our packet.java.net.SocketException
- if anything goes wrong while initializing the new
JingleNodesCandidateDatagramSocket instancepublic void send(java.net.DatagramPacket p) throws java.io.IOException
send
in class java.net.DatagramSocket
p
- the DatagramPacket to be sentjava.io.IOException
- if an I/O error occursDatagramSocket.send(DatagramPacket)
public void receive(java.net.DatagramPacket p) throws java.io.IOException
receive
in class java.net.DatagramSocket
p
- DatagramPacketjava.io.IOException
- if something goes wrongpublic java.net.InetAddress getLocalAddress()
If there is a security manager, its checkConnect method is first called with the host address and -1 as its arguments to see if the operation is allowed.
getLocalAddress
in class java.net.DatagramSocket
getLocalSocketAddress()
,
DatagramSocket.getLocalAddress()
public int getLocalPort()
getLocalPort
in class java.net.DatagramSocket
getLocalSocketAddress()
,
DatagramSocket.getLocalPort()
public java.net.InetSocketAddress getLocalSocketAddress()
getLocalSocketAddress
in class java.net.DatagramSocket
DatagramSocket.getLocalSocketAddress()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.