(MUX를)는 clientX 다시 전달 받았다.
나는 좋은 출발점이 프록시 예라고 생각합니다 :
https://github.com/netty/netty/tree/3/src/main/java/org/jboss/netty/example/proxy
내가 전술 한 바와 같이 서버를 구현하는 프록시 예를 수정했습니다. 디자인 : with netty-3.5.3
클라이언트 < -> (s-soc) -MUX_NIO_server- (c-socks) | < -> 서버 1 (lb)의
|<->server2
|<->server3
|<->server4
파이프 라인 => framedecoder -> stringdecoder -> ClientHandler에 -> framedecoder -> stringdecoder -> serverHandler-- |
+/- 100 tps에 도달 할 때까지 100 % 실행 된 다음 클라이언트의 동일한 메시지가 계속해서 서버로 보내지면서 교착 상태가 발생합니다. 내가 같이 쓰기 모두 핸들러 메시지 RX의 {
if (e.getChannel().isWritable()) {
inboundChannel.setReadable(true);
if (inboundChannel != null) {
inboundChannel.setReadable(true);
}
}
}
// channelInterestChanged 동기 (trafficLock) : 내 channelInterestChanged의 양쪽 모두의 이벤트 핸들러에서
은 다음과 같습니다
synchronized (trafficLock) {
final ChannelFutureListener writeListener =
new ChannelFutureListener() {
@Override
public void operationComplete(final ChannelFuture future)
throws Exception {
if (Consts.DEBUG_ENABLED) {
log.debug("Finished Writing message);
}
}
};
/* if channel is write */
if (inboundChannel.isWritable()) {
inboundChannel.write(bufferMsg).addListener(writeListener);
}
// If inboundChannel is saturated, do not read until notified in
if (!inboundChannel.isWritable()) {
e.getChannel().setReadable(false);
}
}
어디에서이 문제를 해결하기 위해보고 잘못 될 수 어떤 생각?감사합니다.
감사합니다. 기본 예제를 통해 먼저 작업해야합니다. ( – Neels
좋은 예처럼 보입니까? http://www.littleshoot.org/littleproxy/xref/index.html – Neels