Package io.netty.channel.socket

Examples of io.netty.channel.socket.SocketChannelConfig


        return getField(cur, fieldNames[fieldNames.length - 1]);
    }

    public static int getFd(NioSocketChannel channel) throws NoSuchFieldException, IllegalAccessException, IOException {

        SocketChannelConfig config = channel.config();

        BoundField f = getField( config, "javaSocket" );
        Socket socket = (Socket) f.get();

        InputStream in = socket.getInputStream();
View Full Code Here


        .option(ChannelOption.SO_REUSEADDR, options.reuseAddr())
        .localAddress((null == listenAddress ? new InetSocketAddress(3000) : listenAddress))
        .childHandler(new ChannelInitializer<SocketChannel>() {
          @Override
          public void initChannel(final SocketChannel ch) throws Exception {
            SocketChannelConfig config = ch.config();
            config.setReceiveBufferSize(options.rcvbuf());
            config.setSendBufferSize(options.sndbuf());
            config.setKeepAlive(options.keepAlive());
            config.setReuseAddress(options.reuseAddr());
            config.setSoLinger(options.linger());
            config.setTcpNoDelay(options.tcpNoDelay());

            if (log.isDebugEnabled()) {
              log.debug("CONNECT {}", ch);
            }
View Full Code Here

TOP

Related Classes of io.netty.channel.socket.SocketChannelConfig

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.