src/main/java/org/tinyradius/util/RadiusServer.java
public void start(boolean listenAuth, boolean listenAcct) {
        if (listenAuth) {
            new Thread() {
                public void run() {
                    setName("Radius Auth Listener");
                    try {
                        logger.info("starting RadiusAuthListener on port {}", getAuthPort());
                        listenAuth();
                        logger.info("RadiusAuthListener is being terminated");
                    }
                    catch (Exception e) {
                        e.printStackTrace();
                        logger.error("auth thread stopped by exception", e);
                    }
                    finally {
                        authSocket.close();
                        logger.debug("auth socket closed");
                    }
                }
            }.start();
        }

        if (listenAcct) {
            new Thread() {
                public void run() {
                    setName("Radius Acct Listener");
                    try {
                        logger.info("starting RadiusAcctListener on port {}", getAcctPort());
                        listenAcct();
                        logger.info("RadiusAcctListener is being terminated");
                    }
                    catch (Exception e) {
                        e.printStackTrace();
                        logger.error("acct thread stopped by exception", e);
                    }
                    finally {
                        acctSocket.close();
                        logger.debug("acct socket closed");
                    }
                }
            }.start();
        }
    }
/**
     * Starts the Radius server.
     *
     * @param listenAuth open auth port?
     * @param listenAcct open acct port?
     */
Starts the Radius server.

@param listenAuth open auth port.
Starts the Radius server . @param listenAuth open auth port .
public void start(boolean listenAuth, boolean listenAcct) {
        if (listenAuth) {
            new Thread() {
                public void run() {
                    setName("Radius Auth Listener");
                    try {
                        logger.info("starting RadiusAuthListener on port {}", getAuthPort());
                        listenAuth();
                        logger.info("RadiusAuthListener is being terminated");
                    }
                    catch (Exception e) {
                        e.printStackTrace();
                        logger.error("auth thread stopped by exception", e);
                    }
                    finally {
                        authSocket.close();
                        logger.debug("auth socket closed");
                    }
                }
            }.start();
        }
        if (listenAcct) {
            new Thread() {
                public void run() {
                    setName("Radius Acct Listener");
                    try {
                        logger.info("starting RadiusAcctListener on port {}", getAcctPort());
                        listenAcct();
                        logger.info("RadiusAcctListener is being terminated");
                    }
                    catch (Exception e) {
                        e.printStackTrace();
                        logger.error("acct thread stopped by exception", e);
                    }
                    finally {
                        acctSocket.close();
                        logger.debug("acct socket closed");
                    }
                }
            }.start();
        }
    }
public void start ( boolean listenAuth , boolean listenAcct ) { if ( listenAuth ) { new Thread ( ) { public void run ( ) { setName ( "Radius Auth Listener" ) ; try { logger . info ( "starting RadiusAuthListener on port {}" , getAuthPort ( ) ) ; listenAuth ( ) ; logger . info ( "RadiusAuthListener is being terminated" ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; logger . error ( "auth thread stopped by exception" , e ) ; } finally { authSocket . close ( ) ; logger . debug ( "auth socket closed" ) ; } } } . start ( ) ; } if ( listenAcct ) { new Thread ( ) { public void run ( ) { setName ( "Radius Acct Listener" ) ; try { logger . info ( "starting RadiusAcctListener on port {}" , getAcctPort ( ) ) ; listenAcct ( ) ; logger . info ( "RadiusAcctListener is being terminated" ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; logger . error ( "acct thread stopped by exception" , e ) ; } finally { acctSocket . close ( ) ; logger . debug ( "acct socket closed" ) ; } } } . start ( ) ; } }
Starts the Radius server.
Starts the Radius server .