* @throws IOException
*/
public static void main(String[] args) throws IOException {
IoAcceptor acceptor=new NioSocketAcceptor();
acceptor.getFilterChain().addLast("logger", new LoggingFilter());
acceptor.getFilterChain().addLast("httpfilter", new ProtocolCodecFilter(new HttpCodecFactory(charset)));
acceptor.setHandler(new ServerHandler());
//acceptor.getSessionConfig().setMaxReadBufferSize(1024);
acceptor.getSessionConfig().setIdleTime(IdleStatus.BOTH_IDLE, 5);
acceptor.bind(new InetSocketAddress(port));