Package com.yz.net.impl

Examples of com.yz.net.impl.IoServerImpl


  public static void main(String[] args) throws Exception{
    MessageProcessTask.addFilter(new FiltrateTask());    //添加任务处理的过滤任务
   
    PlayerManager.getInstance();
   
    service = new IoServerImpl();
    ProtocolHandler protocolGroup = service.buildProtocolGroup(4, new CmNetProtocolHandler(), new CmWapProtocolHandler());
   
    Configure config = new Configure();
    config.setAddress(new InetSocketAddress("127.0.0.1",8899));
    config.setProtocolHandler(protocolGroup);
View Full Code Here


      Configure config = new Configure();
      config.setAddress(new java.net.InetSocketAddress("127.0.0.1", 8899));
      config.setProtocolHandler(new Protocol());
      config.setIoHandler(new DataHandler());
     
      IoService server = new IoServerImpl();
      config.start(server);
     
   
     
      while(true) {
View Full Code Here

      Configure config = new Configure();
      config.setAddress(new InetSocketAddress("127.0.0.1", 8899));
      config.setProtocolHandler(new EchoProtocol());
      config.setIoHandler(new EchoHandler());
     
      IoService service = new IoServerImpl();
     
      config.start(service);
     
      while(true) {
        Thread.sleep(1000);
View Full Code Here

TOP

Related Classes of com.yz.net.impl.IoServerImpl

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.