Package net.sf.jml.impl

Examples of net.sf.jml.impl.MsnConnectionImpl


        //Judge the client is behind NAT device
        String contentType = getContentType();
        if (contentType != null
                && contentType.startsWith(MessageConstants.CT_PROFILE)) {
            MsnConnectionImpl connectin = (MsnConnectionImpl) session
                    .getMessenger().getConnection();
            connectin.setExternalIP(headers.getProperty("ClientIP"));
            connectin.setExternalPort(headers.getIntProperty("ClientPort", -1));

            if (connectin.getInternalIP().equals(connectin.getExternalIP())
                    && connectin.getInternalPort() == connectin
                            .getExternalPort())
                connectin.setConnectionType(MsnConnectionType.DIRECT);
            else
                connectin.setConnectionType(MsnConnectionType.NAT);
            //TODO to check the NAT device supports UPnP
        }

        ((AbstractMessenger) session.getMessenger())
                .fireSystemMessageReceived(this);
View Full Code Here

TOP

Related Classes of net.sf.jml.impl.MsnConnectionImpl

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.