- # TServerTransport.java
-
- public static abstract class AbstractServerTransportArgs<T extends AbstractServerTransportArgs<T>> {
- int backlog = 0; // A value of 0 means the default value will be used (currently set at 50)
- int clientTimeout = 0;
- InetSocketAddress bindAddr;
-
- public T backlog(int backlog) {
- this.backlog = backlog;
- return (T) this;
- }
-
- public T clientTimeout(int clientTimeout) {
- this.clientTimeout = clientTimeout;
- return (T) this;
- }
-
- ...
- }
- public void listen() throws TTransportException {
- if (serverSocket_ != null) {
- try {
- serverSocket_.setSoTimeout(0);
- } catch (SocketException sx) {
- LOGGER.error("Could not set socket timeout.", sx);
- }
- }
- }