Package io.netty.channel

Examples of io.netty.channel.DefaultEventLoopGroup


    @Test(timeout = 15000)
    public void testSocketReuse() throws InterruptedException {
        ServerBootstrap serverBootstrap = new ServerBootstrap();
        LocalHander serverHandler = new LocalHander("SERVER");
        serverBootstrap
                .group(new DefaultEventLoopGroup(), new DefaultEventLoopGroup())
                .channel(LocalServerChannel.class)
                .childHandler(serverHandler);

        Bootstrap clientBootstrap = new Bootstrap();
        LocalHander clientHandler = new LocalHander("CLIENT");
        clientBootstrap
                .group(new DefaultEventLoopGroup())
                .channel(LocalChannel.class)
                .remoteAddress(new LocalAddress(LOCAL_CHANNEL)).handler(clientHandler);

        serverBootstrap.bind(new LocalAddress(LOCAL_CHANNEL)).sync();
View Full Code Here

TOP

Related Classes of io.netty.channel.DefaultEventLoopGroup

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.