Examples of EOFEventHandler


Examples of io.nodyn.netty.EOFEventHandler

        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

Examples of io.nodyn.netty.EOFEventHandler

            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

Examples of io.nodyn.netty.EOFEventHandler

        super(process, false);
        SocketChannel socketChannel = UnsafeTcp.attach(fd);
        NioSocketChannel channel = new NioSocketChannel(socketChannel);
        this.channelFuture = channel.newSucceededFuture();
        channel.pipeline().addLast("emit.afterConnect", new AfterConnectEventHandler(this.process, TCPWrap.this));
        channel.pipeline().addLast("emit.eof", new EOFEventHandler(this.process, TCPWrap.this));
        channel.pipeline().addLast("handle", new UnrefHandler(this));
        process.getEventLoop().getEventLoopGroup().register(channel);
    }
View Full Code Here

Examples of io.nodyn.netty.EOFEventHandler

            @Override
            protected void initChannel(Channel ch) throws Exception {
                ch.config().setAutoRead(false);
                //ch.pipeline().addLast("debug", new DebugHandler("client"));
                ch.pipeline().addLast("emit.afterConnect", new AfterConnectEventHandler(TCPWrap.this.process, TCPWrap.this));
                ch.pipeline().addLast("emit.eof", new EOFEventHandler(TCPWrap.this.process, TCPWrap.this));
                ch.pipeline().addLast("handle", new UnrefHandler(TCPWrap.this));
            }
        });

        this.channelFuture = bootstrap.connect(addr, port);
View Full Code Here

Examples of io.nodyn.netty.EOFEventHandler

    }

    @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
Copyright © 2018 www.massapi.com. 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.