Change Candidate's get/setTurnServerAddress() to get/setRelayServerAddress() to be more generic in naming relays. Typos and text formatting.
This commit is contained in:
parent
7e868bb3f1
commit
cfa0e2973d
@ -1171,7 +1171,6 @@ public class Agent
|
|||||||
if(!pair.isNominated()
|
if(!pair.isNominated()
|
||||||
&& !parentStream.validListContainsNomineeForComponent(
|
&& !parentStream.validListContainsNomineeForComponent(
|
||||||
parentComponent))
|
parentComponent))
|
||||||
/* && !checkList.containsNomineeForComponent(parentComponent)) */
|
|
||||||
{
|
{
|
||||||
pair.nominate();
|
pair.nominate();
|
||||||
pair.getParentComponent().getParentStream()
|
pair.getParentComponent().getParentStream()
|
||||||
|
|||||||
@ -90,11 +90,11 @@ public abstract class Candidate
|
|||||||
private TransportAddress stunServerAddress = null;
|
private TransportAddress stunServerAddress = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The address of the TURN server that was used to obtain this
|
* The address of the relay server (i.e. TURN, Jingle Nodes, ...) that was
|
||||||
* <tt>Candidate</tt>. Will be <tt>null</tt> if this is not a relayed
|
* used to obtain this <tt>Candidate</tt>. Will be <tt>null</tt> if this is
|
||||||
* candidate.
|
* not a relayed candidate.
|
||||||
*/
|
*/
|
||||||
private TransportAddress turnServerAddress = null;
|
private TransportAddress relayServerAddress = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The address that our TURN/STUN server returned as mapped if this is a
|
* The address that our TURN/STUN server returned as mapped if this is a
|
||||||
@ -442,7 +442,6 @@ public abstract class Candidate
|
|||||||
//IPv4
|
//IPv4
|
||||||
return 10;
|
return 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -511,28 +510,30 @@ public abstract class Candidate
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the address of the TURN server that was used to obtain this
|
* Returns the address of the relay server (i.e. TURN, Jingle Nodes, ...)
|
||||||
* <tt>Candidate</tt> or <tt>null</tt> if this is not a relayed candidate.
|
* that was used to obtain this <tt>Candidate</tt> or <tt>null</tt> if this
|
||||||
|
* is not a relayed candidate.
|
||||||
*
|
*
|
||||||
* @return the address of the TURN server that was used to obtain this
|
* @return the address of the relay server that was used to obtain this
|
||||||
* <tt>Candidate</tt> or <tt>null</tt> if this is not a relayed candidate.
|
* <tt>Candidate</tt> or <tt>null</tt> if this is not a relayed candidate.
|
||||||
*/
|
*/
|
||||||
public TransportAddress getTurnServerAddress()
|
public TransportAddress getRelayServerAddress()
|
||||||
{
|
{
|
||||||
return turnServerAddress;
|
return relayServerAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the address of the TURN server that was used to obtain this
|
* Sets the address of the relay server (i.e. TURN, Jingle Nodes, ...) that
|
||||||
* <tt>Candidate</tt>. Only makes sense if this is a relayed candidate.
|
* was used to obtain this <tt>Candidate</tt>. Only makes sense if this is a
|
||||||
|
* relayed candidate.
|
||||||
*
|
*
|
||||||
* @param address the address of the TURN server that was used to obtain
|
* @param address the address of the relay server that was used to obtain
|
||||||
* this <tt>Candidate</tt> or <tt>null</tt> if this is not a relayed
|
* this <tt>Candidate</tt> or <tt>null</tt> if this is not a relayed
|
||||||
* candidate.
|
* candidate.
|
||||||
*/
|
*/
|
||||||
protected void setTurnServerAddress(TransportAddress address)
|
protected void setRelayServerAddress(TransportAddress address)
|
||||||
{
|
{
|
||||||
this.turnServerAddress = address;
|
this.relayServerAddress = address;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -57,7 +57,7 @@ public class FoundationsRegistry
|
|||||||
server = candidate.getStunServerAddress().getHostAddress();
|
server = candidate.getStunServerAddress().getHostAddress();
|
||||||
break;
|
break;
|
||||||
case RELAYED_CANDIDATE:
|
case RELAYED_CANDIDATE:
|
||||||
server = candidate.getTurnServerAddress().getHostAddress();
|
server = candidate.getRelayServerAddress().getHostAddress();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
server = null;
|
server = null;
|
||||||
|
|||||||
@ -72,7 +72,7 @@ public class RelayedCandidate
|
|||||||
|
|
||||||
// RFC 5245: The base of a relayed candidate is that candidate itself.
|
// RFC 5245: The base of a relayed candidate is that candidate itself.
|
||||||
setBase(this);
|
setBase(this);
|
||||||
setTurnServerAddress(turnCandidateHarvest.harvester.stunServer);
|
setRelayServerAddress(turnCandidateHarvest.harvester.stunServer);
|
||||||
setMappedAddress(mappedAddress);
|
setMappedAddress(mappedAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -61,7 +61,7 @@ public class StunCandidateHarvester
|
|||||||
public final TransportAddress stunServer;
|
public final TransportAddress stunServer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The <tt>StunSTack</tt> used by this instance for the purposes of STUN
|
* The <tt>StunStack</tt> used by this instance for the purposes of STUN
|
||||||
* communication.
|
* communication.
|
||||||
*/
|
*/
|
||||||
private StunStack stunStack;
|
private StunStack stunStack;
|
||||||
|
|||||||
@ -401,10 +401,12 @@ public class TurnCandidateHarvest
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new <tt>Request</tt> which is to be sent to
|
* Creates a new <tt>Request</tt> which is to be sent to
|
||||||
* {@link TurnCandidateHarvester#stunServer} in order to start resolving {@link #hostCandidate}.
|
* {@link TurnCandidateHarvester#stunServer} in order to start resolving
|
||||||
|
* {@link #hostCandidate}.
|
||||||
*
|
*
|
||||||
* @return a new <tt>Request</tt> which is to be sent to
|
* @return a new <tt>Request</tt> which is to be sent to
|
||||||
* {@link TurnCandidateHarvester#stunServer} in order to start resolving {@link #hostCandidate}
|
* {@link TurnCandidateHarvester#stunServer} in order to start resolving
|
||||||
|
* {@link #hostCandidate}
|
||||||
* @see StunCandidateHarvest#createRequestToStartResolvingCandidate()
|
* @see StunCandidateHarvest#createRequestToStartResolvingCandidate()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -453,7 +453,7 @@ public class RelayedCandidateDatagramSocket
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the port number on the local host to which this socket is bound.
|
* Returns the port number on the local host to which this socket is bound.
|
||||||
* <tt>RelayedCandidateDatagram</tt> returns the <tt>port</tt> of its
|
* <tt>RelayedCandidateDatagramSocket</tt> returns the <tt>port</tt> of its
|
||||||
* <tt>localSocketAddress</tt>.
|
* <tt>localSocketAddress</tt>.
|
||||||
*
|
*
|
||||||
* @return the port number on the local host to which this socket is bound
|
* @return the port number on the local host to which this socket is bound
|
||||||
@ -1433,7 +1433,8 @@ public class RelayedCandidateDatagramSocket
|
|||||||
turnCandidateHarvest.harvester.stunServer);
|
turnCandidateHarvest.harvester.stunServer);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
channelDataPacket.setData(channelData, 0, channelDataLength);
|
channelDataPacket.setData(channelData, 0,
|
||||||
|
channelDataLength);
|
||||||
|
|
||||||
channelDataSocket.send(channelDataPacket);
|
channelDataSocket.send(channelDataPacket);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user