⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nioserver.java

📁 短信发送
💻 JAVA
字号:
package com.jdev.net.samples;

import com.jdev.net.connector.Connection;
import com.jdev.net.connector.ConnectionFactory;

public class NIOServer {
	  private ConnectionFactory connFactory = ConnectionFactory.getInstance(
		      ConnectionFactory.TCPSERVER);
	  public void Start(){
		  Connection conn = connFactory.getConnection();
	  }
    public static void main(String[] args) throws Exception {
        try {
//            ServerHandler server = new ServerHandler();
//            Notifier notifier = Notifier.getNotifier();
//            notifier.addListener(server);
//
//            System.out.println("Server starting ...");
//            Reactor s = new Reactor(6188);
//            Thread tServer = new Thread(s);
//            tServer.start();
            NIOServer server = new NIOServer();
            server.Start();
        	
        }
        catch (Exception e) {
            System.out.println("Server error: " + e.getMessage());
            System.exit(-1);
        }
    }
	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -