Package io.nodyn.netty

Examples of io.nodyn.netty.DataEventHandler


        }

        EventLoopGroup eventLoopGroup = process.getEventLoop().getEventLoopGroup();
        Channel channel = NioOutputStreamChannel.create(process, out);
        channel.config().setAutoRead(false);
        channel.pipeline().addLast( new DataEventHandler( process, handle ));
        eventLoopGroup.register(channel);

        return channel.newSucceededFuture();
    }
View Full Code Here


            InputStream in = System.in;
            EventLoopGroup eventLoopGroup = process.getEventLoop().getEventLoopGroup();

            Channel channel = NioInputStreamChannel.create(process, in);
            channel.config().setAutoRead(false);
            channel.pipeline().addLast( new DataEventHandler( process, handle ) );
            eventLoopGroup.register(channel);

            return channel.newSucceededFuture();
        }
View Full Code Here

        NioInputStreamChannel nioChannel = NioInputStreamChannel.create(this.process, in);
        nioChannel.config().setAutoRead(false);

        //nioChannel.pipeline().addLast("debug", new DebugHandler("input:" + 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.INPUT;
View Full Code Here

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

        this.tcp = tcp;
    }

    @Override
    public void channelActive(ChannelHandlerContext ctx) throws Exception {
        ctx.pipeline().addAfter(ctx.name(), "emit.data", new DataEventHandler(this.process, this.tcp));
        emit("afterConnect", this.tcp );
        super.channelActive(ctx);
    }
View Full Code Here

    @Override
    public void channelActive(ChannelHandlerContext ctx) throws Exception {
        TCPWrap clientHandle = new TCPWrap(this.process, ctx.channel().newSucceededFuture());
        ctx.pipeline().addAfter(ctx.name(), "emit.close", new EOFEventHandler(this.process, clientHandle));
        ctx.pipeline().addAfter(ctx.name(), "emit.data", new DataEventHandler(this.process, clientHandle));
        emit("connection", clientHandle);
        super.channelActive(ctx);
    }
View Full Code Here

TOP

Related Classes of io.nodyn.netty.DataEventHandler

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.