Package io.nodyn.netty.pipe

Examples of io.nodyn.netty.pipe.NioDuplexStreamChannel


            process.getEventLoop().getEventLoopGroup().register(channel);
        } else {
            FileInputStream in = new FileInputStream(fileDescriptor);
            FileOutputStream out = new FileOutputStream(fileDescriptor);

            NioDuplexStreamChannel nioChannel = NioDuplexStreamChannel.create(this.process, in, out);
            nioChannel.config().setAutoRead(false);
            nioChannel.config().setOption(ChannelOption.ALLOW_HALF_CLOSURE, true);

            //nioChannel.pipeline().addLast("debug", new DebugHandler("duplex:" + fd + " // " + process.getPosix().getpid()));
            nioChannel.pipeline().addLast("emit.data", new DataEventHandler(this.process, this));
            nioChannel.pipeline().addLast("emit.eof", new EOFEventHandler(this.process, this));
            this.channelFuture = nioChannel.newSucceededFuture();
            process.getEventLoop().getEventLoopGroup().register(nioChannel);
        }

        this.type = Type.DUPLEX;
    }
View Full Code Here

TOP

Related Classes of io.nodyn.netty.pipe.NioDuplexStreamChannel

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.