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()
|
||||
&& !parentStream.validListContainsNomineeForComponent(
|
||||
parentComponent))
|
||||
/* && !checkList.containsNomineeForComponent(parentComponent)) */
|
||||
{
|
||||
pair.nominate();
|
||||
pair.getParentComponent().getParentStream()
|
||||
|
||||
@ -90,11 +90,11 @@ public abstract class Candidate
|
||||
private TransportAddress stunServerAddress = null;
|
||||
|
||||
/**
|
||||
* The address of the TURN server that was used to obtain this
|
||||
* <tt>Candidate</tt>. Will be <tt>null</tt> if this is not a relayed
|
||||
* candidate.
|
||||
* The address of the relay server (i.e. TURN, Jingle Nodes, ...) that was
|
||||
* used to obtain this <tt>Candidate</tt>. Will be <tt>null</tt> if this is
|
||||
* 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
|
||||
@ -442,7 +442,6 @@ public abstract class Candidate
|
||||
//IPv4
|
||||
return 10;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -511,28 +510,30 @@ public abstract class Candidate
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the address of the TURN server that was used to obtain this
|
||||
* <tt>Candidate</tt> or <tt>null</tt> if this is not a relayed candidate.
|
||||
* Returns the address of the relay server (i.e. TURN, Jingle Nodes, ...)
|
||||
* 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.
|
||||
*/
|
||||
public TransportAddress getTurnServerAddress()
|
||||
public TransportAddress getRelayServerAddress()
|
||||
{
|
||||
return turnServerAddress;
|
||||
return relayServerAddress;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the address of the TURN server that was used to obtain this
|
||||
* <tt>Candidate</tt>. Only makes sense if this is a relayed candidate.
|
||||
* Sets the address of the relay server (i.e. TURN, Jingle Nodes, ...) that
|
||||
* 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
|
||||
* 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();
|
||||
break;
|
||||
case RELAYED_CANDIDATE:
|
||||
server = candidate.getTurnServerAddress().getHostAddress();
|
||||
server = candidate.getRelayServerAddress().getHostAddress();
|
||||
break;
|
||||
default:
|
||||
server = null;
|
||||
|
||||
@ -72,7 +72,7 @@ public class RelayedCandidate
|
||||
|
||||
// RFC 5245: The base of a relayed candidate is that candidate itself.
|
||||
setBase(this);
|
||||
setTurnServerAddress(turnCandidateHarvest.harvester.stunServer);
|
||||
setRelayServerAddress(turnCandidateHarvest.harvester.stunServer);
|
||||
setMappedAddress(mappedAddress);
|
||||
}
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ public class StunCandidateHarvester
|
||||
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.
|
||||
*/
|
||||
private StunStack stunStack;
|
||||
|
||||
@ -401,10 +401,12 @@ public class TurnCandidateHarvest
|
||||
|
||||
/**
|
||||
* 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
|
||||
* {@link TurnCandidateHarvester#stunServer} in order to start resolving {@link #hostCandidate}
|
||||
* {@link TurnCandidateHarvester#stunServer} in order to start resolving
|
||||
* {@link #hostCandidate}
|
||||
* @see StunCandidateHarvest#createRequestToStartResolvingCandidate()
|
||||
*/
|
||||
@Override
|
||||
|
||||
@ -453,7 +453,7 @@ public class RelayedCandidateDatagramSocket
|
||||
|
||||
/**
|
||||
* 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>.
|
||||
*
|
||||
* @return the port number on the local host to which this socket is bound
|
||||
@ -1433,7 +1433,8 @@ public class RelayedCandidateDatagramSocket
|
||||
turnCandidateHarvest.harvester.stunServer);
|
||||
}
|
||||
else
|
||||
channelDataPacket.setData(channelData, 0, channelDataLength);
|
||||
channelDataPacket.setData(channelData, 0,
|
||||
channelDataLength);
|
||||
|
||||
channelDataSocket.send(channelDataPacket);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user