title: TServerSocket on the localhost generates an exception
body: <p>I use Ubuntu 14.04 LTS. Here is an example code which works:</p>
  
  <pre><code>boost::shared_ptr&lt;TestHandler&gt; handler(new TestHandler());
  boost::shared_ptr&lt;TProcessor&gt; processor(new TestProcessor(handler));
  boost::shared_ptr&lt;TServerTransport&gt; serverTransport(new TServerSocket(9090));
  boost::shared_ptr&lt;TTransportFactory&gt; transportFactory(new TBufferedTransportFactory());
  boost::shared_ptr&lt;TProtocolFactory&gt; protocolFactory(new TBinaryProtocolFactory());
  
  thriftServerThread = std::thread(&amp;TSimpleServer::serve, TSimpleServer(processor, serverTransport, transportFactory, protocolFactory));
  </code></pre>
  
  <p>I want to use thrift server only within a localhost so I have changed:</p>
  
  <pre><code>boost::shared_ptr&lt;TServerTransport&gt; serverTransport(new TServerSocket(9090));
  </code></pre>
  
  <p>to </p>
  
  <pre><code>boost::shared_ptr&lt;TServerTransport&gt; serverTransport(new TServerSocket("localhost:9090"));
  </code></pre>
  
  <p>but then I get the exception:</p>
  
  <blockquote>
    <p>Thrift: Mon Mar  2 13:28:03 2015 TServerSocket::listen() setsockopt() TCP_DEFER_ACCEPT Operation not supported
    terminate called after throwing an instance of 'apache::thrift::transport::TTransportException'
      what():  Could not set TCP_DEFER_ACCEPT: Operation not supported</p>
  </blockquote>
  
  <p>What is wrong ? How to fix that ?</p>
  
  <p><strong>Edit1</strong> 
  I have updated thrift and now I get another error:</p>
  
  <blockquote>
    <p>Thrift: Tue Mar  3 13:31:40 2015 TServerSocket::listen() PATH 127.0.0.1:9090
    terminate called after throwing an instance of 'apache::thrift::transport::TTransportException'
      what():  Could not bind: Address already in use</p>
  </blockquote>
  
  <p>Netstat doesn't find that port. What is going on ?</p>