Package de.fhkn.in.uce.relaying.message

Examples of de.fhkn.in.uce.relaying.message.RelayingAttribute


        return this.timeoutInSeconds * 1000L;
    }

    @Override
    public NATTraversalTechniqueAttribute getAttribute() {
        return new RelayingAttribute();
    }
View Full Code Here


    private void sendConnectionRequest(final String targetId, final Socket controlConnection) throws Exception {
        logger.debug("Sending connection request"); //$NON-NLS-1$
        final Message requestConnectionMessage = MessageStaticFactory.newSTUNMessageInstance(STUNMessageClass.REQUEST,
                STUNMessageMethod.CONNECTION_REQUEST);
        requestConnectionMessage.addAttribute(new Username(targetId));
        requestConnectionMessage.addAttribute(new RelayingAttribute());
        requestConnectionMessage.writeTo(controlConnection.getOutputStream());
    }
View Full Code Here

    }

    private void sendConnectionRequestResponse(final Socket controlConnection, final Message connectionRequest,
            final InetSocketAddress endpointAtRelay) throws IOException {
        final Message response = connectionRequest.buildSuccessResponse();
        response.addAttribute(new RelayingAttribute());
        XorMappedAddress endpointAtRelayAttribute;
        if (endpointAtRelay.getAddress() instanceof Inet6Address) {
            endpointAtRelayAttribute = new XorMappedAddress(endpointAtRelay, ByteBuffer.wrap(
                    response.getHeader().getTransactionId()).getInt());
        } else {
View Full Code Here

    private void callTarget(final UserData target, final Message connectionRequestFromSource) throws Exception {
        final Socket toTarget = target.getSocketToUser();
        logger.debug("Calling target {}", toTarget.toString());
        final Message connectionRequest = MessageStaticFactory.newSTUNMessageInstance(STUNMessageClass.REQUEST,
                STUNMessageMethod.CONNECTION_REQUEST, connectionRequestFromSource.getHeader().getTransactionId());
        connectionRequest.addAttribute(new RelayingAttribute());
        connectionRequest.writeTo(toTarget.getOutputStream());
        // return this.waitForTarget(toTarget);
    }
View Full Code Here

        failureResponse.writeTo(out);
    }

    @Override
    public NATTraversalTechniqueAttribute getAttributeForTraversalTechnique() {
        return new RelayingAttribute();
    }
View Full Code Here

        assertEquals(expectedResult, actualResult);
    }

    @Test
    public void testGetEncoded() {
        NATTraversalTechniqueAttribute attr = new RelayingAttribute();
        assertEquals(attr, this.metaData.getAttribute());
    }
View Full Code Here

TOP

Related Classes of de.fhkn.in.uce.relaying.message.RelayingAttribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.