Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Netty 在windows7上本地主机上回显写消息两次_Netty - Fatal编程技术网

Netty 在windows7上本地主机上回显写消息两次

Netty 在windows7上本地主机上回显写消息两次,netty,Netty,我在向导游学内蒂。当使用带有echo back的echo示例时,我发现了一些奇怪的东西。代码就像示例: public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) { //echo back System.out.println(buf.readableBytes()); //will print 1 Channel ch = e.getChannel(); ch.write(e

我在向导游学内蒂。当使用带有echo back的echo示例时,我发现了一些奇怪的东西。代码就像示例:

public void messageReceived(ChannelHandlerContext ctx, MessageEvent e) {
    //echo back
    System.out.println(buf.readableBytes()); //will print  1
    Channel  ch = e.getChannel();
    ch.write(e.getMessage());
}
我在windows7上使用netty 3.6.2,使用cmd telnet localhost 8080。第一次键入类似“1”的字符时,telnet控制台显示“1”,但从现在开始,当我键入任何类似“2”的字符时,控制台显示两个类似“22”的字符。 怎么了