Tag: nio

.NET的任何NIO框架?

是否有适用于.NET的非阻塞IO框架? 我正在寻找类似于Apache Mina和JBoss Netty为Java提供的东西:一个用于实现高度可扩展服务器的框架 – 而不仅仅是.NET框架提供的低级支持。 编辑:为了更好地解释我想看到的内容,这里有一个基本的例子,你可以用Mina做什么: 在Mina我可以实现这样的ProtocolDecoder: public class SimpleDecoder extends CumulativeProtocolDecoder { protected boolean doDecode(IoSession session, IoBuffer in, ProtocolDecoderOutput out) throws Exception { if (in.remaining() < 4) return false; int length = in.getInt(); if(in.remaining() < 4 + length) return false; Command command = new Command(in.asInputStream()); out.write(command); } } 像这样的CommandHandler: public abstract class CommandHandler […]