package Netty; public class StartServer implements Runnable{ boolean statrt=true; int tcprce=0; /**Æô¶¯Ï̵߳ķ½·¨*/ public void startThread() { Thread t=new Thread(this); t.start(); } public void run() { while(statrt) { try { try { NettyServer.server(); statrt=false; } catch (Exception e) { // TODO ×Ô¶¯Éú³ÉµÄ catch ¿é e.printStackTrace(); }//¿ªÆôTCP¼àÌý Thread.sleep(300);//ÐÝÃßʱ¼ä } catch (InterruptedException e) { e.printStackTrace(); } } } }