Package com.guxuede.mina.codefactory

Examples of com.guxuede.mina.codefactory.HttpCodecFactory


   * @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));
View Full Code Here

TOP

Related Classes of com.guxuede.mina.codefactory.HttpCodecFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.