public class TcpHostCandidate extends HostCandidate
HostCandidate
allowing the instance to have
a list of Sockets instead of just one socket. This is needed,
because with TCP, connections from different remote addresses result in
different Socket instances.Modifier and Type | Field and Description |
---|---|
private List<IceSocketWrapper> |
sockets
List of accepted sockets for this TcpHostCandidate.
|
MAX_LOCAL_PREFERENCE, MAX_TYPE_PREFERENCE, MIN_LOCAL_PREFERENCE, MIN_TYPE_PREFERENCE, priority
Constructor and Description |
---|
TcpHostCandidate(TransportAddress transportAddress,
Component parentComponent)
Initializes a new TcpHostCandidate.
|
Modifier and Type | Method and Description |
---|---|
void |
addSocket(IceSocketWrapper socket) |
protected void |
free()
Frees resources allocated by this candidate such as its
DatagramSocket, for example.
|
protected IceSocketWrapper |
getCandidateIceSocketWrapper(SocketAddress remoteAddress) |
createStunDatagramPacketFilter, getCandidateIceSocketWrapper
findRelatedCandidate, getDatagramSocket, getExtendedType, getIceSocketWrapper, getSocket, getStunSocket, getStunStack, getUfrag, isDefault, isSSL, setExtendedType, setSSL, setUfrag
canReach, compareTo, computeGTalkPriority, computeGTalkPriorityForType, computePriority, computePriorityForType, equals, getBase, getDefaultPreference, getFoundation, getHostAddress, getMappedAddress, getParentComponent, getPriority, getReflexiveAddress, getRelatedAddress, getRelatedCandidate, getRelayedAddress, getRelayServerAddress, getStunServerAddress, getTcpType, getTransport, getTransportAddress, getType, hashCode, isVirtual, setBase, setCandidateType, setFoundation, setMappedAddress, setRelayServerAddress, setStunServerAddress, setTcpType, setVirtual, toShortString, toString
private final List<IceSocketWrapper> sockets
public TcpHostCandidate(TransportAddress transportAddress, Component parentComponent)
transportAddress
- the transport address of this
TcpHostCandidate.parentComponent
- the Component that this candidate
belongs to.protected IceSocketWrapper getCandidateIceSocketWrapper(SocketAddress remoteAddress)
getCandidateIceSocketWrapper
in class LocalCandidate
remoteAddress
- the remote address for which to return an
associated socket.IceSocketWrapper
instance for this candidate,
associated with a particular remote address.public void addSocket(IceSocketWrapper socket)
protected void free()
LocalCandidate
free
in class LocalCandidate
Copyright © 2018. All rights reserved.