Package io.netty.bootstrap

Examples of io.netty.bootstrap.ServerBootstrap.bind()


                return Channels.pipeline(new EchoServerHandler());
            }
        });

        // Bind and start to accept incoming connections.
        bootstrap.bind(new InetSocketAddress(port));
    }

    public static void main(String[] args) throws Exception {
        int port;
        if (args.length > 0) {
View Full Code Here


        // Set up the default server-side event pipeline.
        EchoServerHandler handler = new EchoServerHandler();
        sb.getPipeline().addLast("handler", handler);

        // Start up the server.
        sb.bind(socketAddress);

        // Configure the client.
        ClientBootstrap cb = new ClientBootstrap(
                new DefaultLocalClientChannelFactory());
View Full Code Here

                return Channels.pipeline(new PortUnificationServerHandler());
            }
        });

        // Bind and start to accept incoming connections.
        bootstrap.bind(new InetSocketAddress(port));
    }

    public static void main(String[] args) throws Exception {
        int port;
        if (args.length > 0) {
View Full Code Here

        bootstrap.setOption("receiveBufferSize", 1048576);

        bootstrap.setOption("child.sctpNoDelay", true);

        // Bind and start to accept incoming connections.
        bootstrap.bind(new InetSocketAddress(port));
    }
   
    public static void main(String[] args) throws Exception {
        int port;
        if (args.length > 0) {
View Full Code Here

                        new ObjectEchoServerHandler());
            }
        });

        // Bind and start to accept incoming connections.
        bootstrap.bind(new InetSocketAddress(port));
    }

    public static void main(String[] args) throws Exception {
        int port;
        if (args.length > 0) {
View Full Code Here

        ServerBootstrap sb = new ServerBootstrap(
                new DefaultLocalServerChannelFactory());

        sb.setPipelineFactory(new LocalServerPipelineFactory(eventExecutor));
        sb.bind(socketAddress);

        ClientBootstrap cb = new ClientBootstrap(
                new DefaultLocalClientChannelFactory());

        cb.setPipelineFactory(new ChannelPipelineFactory() {
View Full Code Here

        sb.setPipelineFactory(
                new HexDumpProxyPipelineFactory(cf, remoteHost, remotePort));

        // Start up the server.
        sb.bind(new InetSocketAddress(localPort));
    }

    public static void main(String[] args) throws Exception {
        // Validate command line options.
        if (args.length != 3) {
View Full Code Here

        // Set up the event pipeline factory.
        bootstrap.setPipelineFactory(new HttpStaticFileServerPipelineFactory());

        // Bind and start to accept incoming connections.
        bootstrap.bind(new InetSocketAddress(port));
    }

    public static void main(String[] args) {
        int port;
        if (args.length > 0) {
View Full Code Here

                return Channels.pipeline(new DiscardServerHandler());
            }
        });

        // Bind and start to accept incoming connections.
        bootstrap.bind(new InetSocketAddress(port));
    }

    public static void main(String[] args) throws Exception {
        int port;
        if (args.length > 0) {
View Full Code Here

        // Set up the event pipeline factory.
        bootstrap.setPipelineFactory(new LocalTimeServerPipelineFactory());

        // Bind and start to accept incoming connections.
        bootstrap.bind(new InetSocketAddress(port));
    }

    public static void main(String[] args) throws Exception {
        int port;
        if (args.length > 0) {
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.