赞
踩
Integer.MAX_VALUE = 256*1024*1024
客户端配置maxInboundMessageSize
ManagedChannelBuilder builder = ManagedChannelBuilder.forAddress(serverIp, serverPort). maxInboundMessageSize(Integer.MAX_VALUE). usePlaintext(); this.channel = builder.intercept(new ClientInterceptor[]{}).build(); blockingStub = GRPCInferenceServiceGrpc.newBlockingStub(channel);
服务端配置
server = ServerBuilder.forPort(8901) .addService(new GrpcService()) .maxInboundMessageSize(Integer.MAX_VALUE) .build(); server.start();
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。