## org.jboss.netty.channel.socket
Interface SocketChannelConfig

All Superinterfaces:
  ChannelConfig

All Known Subinterfaces:
  NioSocketChannelConfig

All Known Implementing Classes:
  DefaultSocketChannelConfig, HttpTunnelingSocketChannelConfig

    public interface SocketChannelConfig

extends ChannelConfig

A `ChannelConfig` for a `SocketChannel`.

### Available options

In addition to the options provided by `ChannelConfig`, `SocketChannelConfig` allows the following options in the option map:

Name | Associated setter method
--- | ---
`"keepAlive"` | `setKeepAlive(boolean)`
`"reuseAddress"` | `setReuseAddress(boolean)`
`"soLinger"` | `setSoLinger(int)`
`"tcpNoDelay"` | `setTcpNoDelay(boolean)`
`"receiveBufferSize"` | `setReceiveBufferSize(int)`
`"sendBufferSize"` | `setSendBufferSize(int)`
`"trafficClass"` | `setTrafficClass(int)`

Version:
  $Rev: 2080 $, $Date: 2010-01-26 18:04:19 +0900 (Tue, 26 Jan 2010) $
Author:
  The Netty Project, Trustin Lee

Method Summary
`int` `getReceiveBufferSize()` Gets the `SO_RCVBUF` option.
`int` `getSendBufferSize()` Gets the `SO_SNDBUF` option.
`int` `getSoLinger()` Gets the `SO_LINGER` option.
`int` `getTrafficClass()` Gets the traffic class.
`boolean` `isKeepAlive()` Gets the `SO_KEEPALIVE` option.
`boolean` `isReuseAddress()` Gets the `SO_REUSEADDR` option.
`boolean` `isTcpNoDelay()` Gets the `SO_TCPNODELAY` option.
`void` `setKeepAlive(boolean keepAlive)` Sets the `SO_KEEPALIVE` option.
`void` `setPerformancePreferences(int connectionTime, int latency, int bandwidth)` Sets the performance preferences as specified in `Socket.setPerformancePreferences(int, int, int)`.
`void` `setReceiveBufferSize(int receiveBufferSize)` Gets the `SO_RCVBUF` option.
`void` `setReuseAddress(boolean reuseAddress)` Sets the `SO_REUSEADDR` option.
`void` `setSendBufferSize(int sendBufferSize)` Sets the `SO_SNDBUF` option.
`void` `setSoLinger(int soLinger)` Sets the `SO_LINGER` option.
`void` `setTcpNoDelay(boolean tcpNoDelay)` Sets the `SO_TCPNODELAY` option.
`void` `setTrafficClass(int trafficClass)` Sets the traffic class as specified in `Socket.setTrafficClass(int)`.

Methods inherited from interface org.jboss.netty.channel.ChannelConfig
`getBufferFactory, getConnectTimeoutMillis, getPipelineFactory, setBufferFactory, setConnectTimeoutMillis, setOption, setOptions, setPipelineFactory`

Method Detail

### isTcpNoDelay

    boolean isTcpNoDelay()

  Gets the `SO_TCPNODELAY` option.

### setTcpNoDelay

    void setTcpNoDelay(boolean tcpNoDelay)

  Sets the `SO_TCPNODELAY` option.

### getSoLinger

    int getSoLinger()

  Gets the `SO_LINGER` option.

### setSoLinger

    void setSoLinger(int soLinger)

  Sets the `SO_LINGER` option.

### getSendBufferSize

    int getSendBufferSize()

  Gets the `SO_SNDBUF` option.

### setSendBufferSize

    void setSendBufferSize(int sendBufferSize)

  Sets the `SO_SNDBUF` option.

### getReceiveBufferSize

    int getReceiveBufferSize()

  Gets the `SO_RCVBUF` option.

### setReceiveBufferSize

    void setReceiveBufferSize(int receiveBufferSize)

  Gets the `SO_RCVBUF` option.

### isKeepAlive

    boolean isKeepAlive()

  Gets the `SO_KEEPALIVE` option.

### setKeepAlive

    void setKeepAlive(boolean keepAlive)

  Sets the `SO_KEEPALIVE` option.

### getTrafficClass

    int getTrafficClass()

  Gets the traffic class.

### setTrafficClass

    void setTrafficClass(int trafficClass)

  Sets the traffic class as specified in `Socket.setTrafficClass(int)`.

### isReuseAddress

    boolean isReuseAddress()

  Gets the `SO_REUSEADDR` option.

### setReuseAddress

    void setReuseAddress(boolean reuseAddress)

  Sets the `SO_REUSEADDR` option.

### setPerformancePreferences

    void setPerformancePreferences(int connectionTime,
                                   int latency,
                                   int bandwidth)

  Sets the performance preferences as specified in `Socket.setPerformancePreferences(int, int, int)`.

Copyright © 2008-2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.