Package de.fhkn.in.uce.stun.attribute

Examples of de.fhkn.in.uce.stun.attribute.ChangeRequest


    private void sendIndicationWithChangeRequestAttribute(final int changeRequestFlag, final Socket sendSocket)
            throws IOException {
        logger.debug("Sending indication with change request flag = {}", changeRequestFlag); //$NON-NLS-1$
        final Message indication = MessageStaticFactory.newSTUNMessageInstance(STUNMessageClass.INDICATION,
                STUNMessageMethod.BINDING);
        indication.addAttribute(new ChangeRequest(changeRequestFlag));
        indication.writeTo(sendSocket.getOutputStream());
    }
View Full Code Here


        response.writeTo(this.socket.getOutputStream());
    }

    private void handleMessageWithChangeRequestAttribute(final Message toHandle, final InetSocketAddress remoteAddress)
            throws Exception {
        final ChangeRequest changeRequest = toHandle.getAttribute(ChangeRequest.class);
        logger.debug("Getting indication with change request flag = {}", changeRequest.getFlag()); //$NON-NLS-1$
        switch (changeRequest.getFlag()) {
        case ChangeRequest.CHANGE_IP_AND_PORT:
            this.sendIndicationViaNewSocket(new InetSocketAddress(this.secondaryAddress.getAddress(), this.thirdPort),
                    toHandle, remoteAddress);
            break;
        case ChangeRequest.CHANGE_PORT:
View Full Code Here

TOP

Related Classes of de.fhkn.in.uce.stun.attribute.ChangeRequest

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.