1package sudoku; 2 3import muduo.rpc.NewChannelCallback; 4import muduo.rpc.RpcChannel; 5import muduo.rpc.RpcServer; 6 7public class Server { 8 9 public static void main(String[] args) { 10 RpcServer server = new RpcServer(); 11 server.registerService(Sudoku.SudokuService.newReflectiveService(new SudokuImpl())); 12 server.setNewChannelCallback(new NewChannelCallback() { 13 14 @Override 15 public void run(RpcChannel channel) { 16 // TODO call client 17 18 } 19 }); 20 server.start(9981); 21 } 22} 23