Package com.chenshuo.muduo.protorpc.sudoku.SudokuProto

Examples of com.chenshuo.muduo.protorpc.sudoku.SudokuProto.SudokuService.solve()


    private static void sendAsyncRequest(final RpcChannel channel, RpcClient client) {
        final CountDownLatch latch = new CountDownLatch(1);
        System.err.println("sendRequest " + channel);
        SudokuService remoteService = SudokuProto.SudokuService.newStub(channel);
        SudokuRequest request = SudokuRequest.newBuilder().setCheckerboard("001010").build();
        remoteService.solve(null, request, new RpcCallback<SudokuProto.SudokuResponse>() {
            @Override
            public void run(SudokuResponse parameter) {
                System.out.println(parameter);
                channel.disconnect();
                latch.countDown();
View Full Code Here


    public void testClient() throws Exception {
        MockChannel mockChannel = new MockChannel();
        RpcChannel channel = new RpcChannel(mockChannel);
        SudokuService remoteService = SudokuProto.SudokuService.newStub(channel);
        SudokuRequest request = SudokuRequest.newBuilder().setCheckerboard("001010").build();
        remoteService.solve(null, request, new RpcCallback<SudokuProto.SudokuResponse>() {
            @Override
            public void run(SudokuResponse response) {
                // System.out.println(parameter);
                gotResponse = response;
            }
View Full Code Here

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.