Package com.chenshuo.muduo.protorpc.sudoku

Source Code of com.chenshuo.muduo.protorpc.sudoku.Server

package com.chenshuo.muduo.protorpc.sudoku;

import com.chenshuo.muduo.protorpc.NewChannelCallback;
import com.chenshuo.muduo.protorpc.RpcChannel;
import com.chenshuo.muduo.protorpc.RpcServer;
import com.chenshuo.muduo.protorpc.sudoku.SudokuProto;

public class Server {

    public static void main(String[] args) {
        RpcServer server = new RpcServer();
        server.registerService(SudokuProto.SudokuService.newReflectiveService(new SudokuImpl()));
        server.setNewChannelCallback(new NewChannelCallback() {

            @Override
            public void run(RpcChannel channel) {
                // TODO call client

            }
        });
        server.start(9981);
    }
}
TOP

Related Classes of com.chenshuo.muduo.protorpc.sudoku.Server

TOP
Copyright © 2018 www.massapi.com. 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.