code: public void setSoTimeout(int timeout) throws SocketException {
          if (mSocket != null) {
              mSocket.setSoTimeout(timeout);
          }
          else {
              setOption(2, new Integer(timeout));
          }
      }
docs: Option 2.