org.apache.cassandra.thrift

## Class TCustomServerSocket

- java.lang.Object
- - org.apache.thrift.transport.TServerTransport
  - - org.apache.cassandra.thrift.TCustomServerSocket

All Implemented Interfaces:
  java.io.Closeable, java.lang.AutoCloseable

    public class TCustomServerSocket
    extends org.apache.thrift.transport.TServerTransport

Extends Thrift's TServerSocket to allow customization of various desirable TCP properties.

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.thrift.transport.TServerTransport

`org.apache.thrift.transport.TServerTransport.AbstractServerTransportArgs<T extends org.apache.thrift.transport.TServerTransport.AbstractServerTransportArgs<T>>`

### Constructor Summary

Constructors
Constructor and Description
`TCustomServerSocket(java.net.InetSocketAddress bindAddr, boolean keepAlive, java.lang.Integer sendBufferSize, java.lang.Integer recvBufferSize, java.lang.Integer listenBacklog)` Allows fine-tuning of the server socket including keep-alive, reuse of addresses, send and receive buffer sizes.
`TCustomServerSocket(java.net.ServerSocket socket, boolean keepAlive, java.lang.Integer sendBufferSize, java.lang.Integer recvBufferSize)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected TCustomSocket` `acceptImpl()`
`void` `close()`
`void` `interrupt()`
`void` `listen()`

### Methods inherited from class org.apache.thrift.transport.TServerTransport

`accept`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### TCustomServerSocket

    public TCustomServerSocket(java.net.InetSocketAddress bindAddr,
                               boolean keepAlive,
                               java.lang.Integer sendBufferSize,
                               java.lang.Integer recvBufferSize,
                               java.lang.Integer listenBacklog)
                        throws org.apache.thrift.transport.TTransportException

Allows fine-tuning of the server socket including keep-alive, reuse of addresses, send and receive buffer sizes.

Parameters:
  `bindAddr` -
  `keepAlive` -
  `sendBufferSize` -
  `recvBufferSize` -
Throws:
  `org.apache.thrift.transport.TTransportException`

#### TCustomServerSocket

    public TCustomServerSocket(java.net.ServerSocket socket,
                               boolean keepAlive,
                               java.lang.Integer sendBufferSize,
                               java.lang.Integer recvBufferSize)

### Method Detail

#### acceptImpl

    protected TCustomSocket acceptImpl()
                                throws org.apache.thrift.transport.TTransportException

Specified by:
  `acceptImpl` in class `org.apache.thrift.transport.TServerTransport`
Throws:
  `org.apache.thrift.transport.TTransportException`

#### listen

    public void listen()
                throws org.apache.thrift.transport.TTransportException

Specified by:
  `listen` in class `org.apache.thrift.transport.TServerTransport`
Throws:
  `org.apache.thrift.transport.TTransportException`

#### close

    public void close()

Specified by:
  `close` in interface `java.io.Closeable`
Specified by:
  `close` in interface `java.lang.AutoCloseable`
Specified by:
  `close` in class `org.apache.thrift.transport.TServerTransport`

#### interrupt

    public void interrupt()

Overrides:
  `interrupt` in class `org.apache.thrift.transport.TServerTransport`