package eu.univento.cloud.client; import io.netty.bootstrap.Bootstrap; import io.netty.channel.Channel; import io.netty.channel.ChannelInitializer; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.nio.NioSocketChannel; /** * @author joethei * @version 0.1 */ public class CloudClient { public CloudClient() throws Exception{ NioEventLoopGroup child = new NioEventLoopGroup(); try{ Bootstrap bootstrap = new Bootstrap(); bootstrap.channel(NioSocketChannel.class); bootstrap.group(child); bootstrap.handler(new ChannelInitializer() { @Override protected void initChannel(Channel channel) throws Exception { } }); bootstrap.connect("master.univento.eu", 8000).sync().channel().closeFuture().sync(); }finally { child.shutdownGracefully(); } } }