Comments (2)
类 com.nettyrpc.client.RpcClientHandler
public RPCFuture sendRequest(RpcRequest request) {
final CountDownLatch latch = new CountDownLatch(1);
RPCFuture rpcFuture = new RPCFuture(request);
pendingRPC.put(request.getRequestId(), rpcFuture);
//channel.writeAndFlush(request); #9 注释掉就行了,看下面一行,再次调用了写入了request
channel.writeAndFlush(request).addListener(new ChannelFutureListener() {
@Override
public void operationComplete(ChannelFuture future) {
latch.countDown();
}
});
try {
latch.await();
} catch (InterruptedException e) {
LOGGER.error(e.getMessage());
}
return rpcFuture;
}
}
from nettyrpc.
@caleimo
Thanks, fixed it.
from nettyrpc.
Related Issues (20)
- 关于RpcServer DCL的问题 HOT 3
- RPCFuture起了一个什么样的作用 HOT 2
- 您好,关于AQS有些疑惑,请大神指点
- getState为啥调用两次 HOT 2
- 如果在RpcClientHandler的channelRead0触发之前就调用了rpcFuture.get(),岂不是直接返回null?这逻辑没问题么? HOT 4
- 请问这个能作为一个框架,或者jar包导入项目直接用吗? HOT 1
- 关于框架设计上的一些错误 HOT 4
- RPCFuture 一个疑问 HOT 2
- 自己实现了一个Sync,作用是什么,这块有点疑问? HOT 4
- 为什么RpcDecoder里面又进行了粘包半包的处理 HOT 3
- RpcClientHandler里的sendRequest方法是不是同步的? HOT 2
- 大佬,为啥测试不了的 HOT 2
- 请问如何在调用的时候动态获取bean呢? HOT 1
- client端RPC调用流程优化 HOT 2
- 支持指定IP+port调用吗 HOT 1
- LRU负载均衡的困惑
- 递归添加zk状态监听
- RpcLoadBalanceLRU
- Kryo Deserialization Vulnerability in NettyRpc 1.2
- `HessianSerializer` and `Hessian1Serializer` Deserialization Vulnerability in NettyRpc
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nettyrpc.