void sendMessage() { // logger.info("WelCome To Face2face Chat Room, You Can Say Something Now: "); // Scanner sc = new Scanner(System.in); // String content = sc.nextLine(); String content = "Hello, I am Tom!"; // logger.info("{} Send Message: {} to {}", _userId, content, _friend); Chat.CPrivateChat.Builder cp = Chat.CPrivateChat.newBuilder(); cp.setContent(content); cp.setSelf(_userId); cp.setDest(_userId); ByteBuf byteBuf = Utils.pack2Client(cp.build()); _gateClientConnection.writeAndFlush(byteBuf); }
public Builder toBuilder() { return newBuilder(this); }
public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(protobuf.generate.cli2srv.chat.Chat.CPrivateChat prototype) {
public static Builder newBuilder(protobuf.generate.cli2srv.chat.Chat.CPrivateChat prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); }