Package de.fhkn.in.uce.holepunching.core.target

Examples of de.fhkn.in.uce.holepunching.core.target.HolePunchingTarget


    @Override
    public Socket createTargetSideConnection(final String targetId, final Socket controlConnection,
            final Message connectionRequestMessage) throws ConnectionNotEstablishedException {
        // this.checkIfTargetIsInitialized();
        try {
            HolePunchingTarget target = new HolePunchingTarget(controlConnection, targetId);
            logger.debug("Sending connection request response"); //$NON-NLS-1$
            this.sendConnectionRequestResponse(controlConnection, connectionRequestMessage);
            logger.debug("Starting hole punching target"); //$NON-NLS-1$
            target.start(connectionRequestMessage);
            logger.debug("Waiting for accepted socket"); //$NON-NLS-1$
            return target.accept();
        } catch (final Exception e) {
            final String errorMessage = "Could not create target-side connection"; //$NON-NLS-1$
            logger.error(errorMessage, e);
            throw new ConnectionNotEstablishedException(this.metaData.getTraversalTechniqueName(), errorMessage, e);
        }
View Full Code Here

TOP

Related Classes of de.fhkn.in.uce.holepunching.core.target.HolePunchingTarget

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.