Package com.manning.nettyinaction.chapter16

Source Code of com.manning.nettyinaction.chapter16.RegisterSocket

package com.manning.nettyinaction.chapter16;

import io.netty.channel.EventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioSocketChannel;

/**
* @author <a href="mailto:nmaurer@redhat.com">Norman Maurer</a>
*/
public class RegisterSocket {

    public void register(java.nio.channels.SocketChannel socket, EventLoopGroup egroup) {
        java.nio.channels.SocketChannel mySocket = socket;

        SocketChannel ch = new NioSocketChannel(mySocket);
        EventLoopGroup group = egroup;
        group.register(ch);

    }


}
TOP

Related Classes of com.manning.nettyinaction.chapter16.RegisterSocket

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.