Package com.chenshuo.muduo.protorpc

Examples of com.chenshuo.muduo.protorpc.NewChannelCallback


    @SuppressWarnings("unused")
    private static void asyncConnect(InetSocketAddress addr) {
        final RpcClient client = new RpcClient();
        client.registerService(SudokuProto.SudokuService.newReflectiveService(new SudokuImpl()));
        client.startConnect(addr, new NewChannelCallback() {
            @Override
            public void run(RpcChannel channel) {
                sendAsyncRequest(channel, client);
            }
        });
View Full Code Here


            // payload = "Hello";
            request = EchoRequest.newBuilder().setPayload(payload).build();
        }

        public void connect() {
            client.startConnect(serverAddr, new NewChannelCallback() {
                @Override
                public void run(RpcChannel channel) {
                    remoteService = EchoService.newStub(channel);
                    allConnected.countDown();
                }
View Full Code Here

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
View Full Code Here

TOP

Related Classes of com.chenshuo.muduo.protorpc.NewChannelCallback

Copyright © 2018 www.massapicom. 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.