Server.java revision b5a588df
1420c9859SShuo Chenpackage sudoku; 2420c9859SShuo Chen 3420c9859SShuo Chenimport muduo.rpc.NewChannelCallback; 4420c9859SShuo Chenimport muduo.rpc.RpcChannel; 5420c9859SShuo Chenimport muduo.rpc.RpcServer; 6420c9859SShuo Chen 7420c9859SShuo Chenpublic class Server { 8420c9859SShuo Chen 9420c9859SShuo Chen public static void main(String[] args) { 10420c9859SShuo Chen RpcServer server = new RpcServer(); 11420c9859SShuo Chen server.registerService(Sudoku.SudokuService.newReflectiveService(new SudokuImpl())); 12420c9859SShuo Chen server.setNewChannelCallback(new NewChannelCallback() { 13420c9859SShuo Chen 14420c9859SShuo Chen @Override 15420c9859SShuo Chen public void run(RpcChannel channel) { 16420c9859SShuo Chen // TODO call client 17420c9859SShuo Chen 18420c9859SShuo Chen } 19420c9859SShuo Chen }); 20b5a588dfSShuo Chen server.start(9981); 21420c9859SShuo Chen } 22420c9859SShuo Chen} 23