@Override public InetSocketAddress visitBindingSuccessResponse( final BindingSuccessResponse response) { return response.getMappedAddress(); }
/** * Creates a new binding response message. * * @param transactionId * The ID of the transaction. * @param address * The mapped address. */ public BindingSuccessResponse(final byte[] transactionId, final InetSocketAddress address) { super(new UUID(transactionId), StunMessageType.BINDING_SUCCESS_RESPONSE, createAttributes(address)); m_mappedAddress = address; }
/** * Creates a new binding response message. * * @param transactionId * The transaction ID of the response. * @param attributes * The response attributes. */ public BindingSuccessResponse(final UUID transactionId, final Map<StunAttributeType, StunAttribute> attributes) { super(transactionId, StunMessageType.BINDING_SUCCESS_RESPONSE, attributes); m_mappedAddress = getAddress(attributes); }
public Object visitBindingRequest(final BindingRequest binding) { LOG.debug("STUN server visiting binding request..."); final InetSocketAddress address = (InetSocketAddress) m_session.getRemoteAddress(); final UUID transactionId = binding.getTransactionId(); final StunMessage response = new BindingSuccessResponse(transactionId.getRawBytes(), address); this.m_session.write(response); return null; } }
return null; final UUID transactionId = response.getTransactionId(); final StunMessage turnResponse = new BindingSuccessResponse(transactionId.getRawBytes(), remoteAddress); wrapInSendIndication(turnResponse);
return new BindingRequest(id, attributes); case BINDING_SUCCESS_RESPONSE: return new BindingSuccessResponse(id, attributes); case BINDING_ERROR_RESPONSE: return new BindingErrorResponse(id, attributes);
new BindingSuccessResponse(transactionId.getRawBytes(), remoteAddress);
@Override public String toString() { return getClass().getSimpleName() + " with MAPPED ADDRESS: " + getMappedAddress(); }
bsr.getMappedAddress(); final IceCandidate matchingCandidate = m_mediaStream.getLocalCandidate(mappedAddress,